support
support copied to clipboard
[Bug] Paste blocks near cursor
Currently pasted blocks appear close to the position of the copied original. This might even lead to the situation that the pasted blocks appear outside of the view port and the user thinks that it was not pasted at all.
Originally posted by @ggramlich in https://github.com/pybricks/support/discussions/1568
@ggramlich: Feel free to create these as issues directly. Basically, anything that has a "yes we can"/"no we can't" answer can just be an issue, so don't hold back :smile: Everything else ("How/why/maybe...") can be a discussion.
Good suggestion, though a good bit of work will be needed to make this work. Ideally, we'd use something built into Blockly for this.
I think this could work well for copy paste via the right-click context menu. On pasting, I suppose we could move the stack to the location of the context menu.
But what about ctrl+c, ctrl+v? @ggramlich, what would you intuitively expect to happen in that case? Should it be pasted where the workspace was clicked last?
It looks like some work has been done upstream in https://github.com/google/blockly/pull/7521
It doesn't seem to be merged into a release yet.
A scenario I might do:
- select a block
- ctrl-c
- move to another part of the program
- crtl-v
and 3 and 4 repeated a few times to paste the copied part(s) to different places.
As example a part of debugging or such. Would be hard to find out at what location I want it to go. Most of the times I just paste a few times and move it where I want it to go.
It looks like some work has been done upstream in google/blockly#7521
It doesn't seem to be merged into a release yet.
The behavior there seems to be exactly as I would expect it. It looks like your comment there caused some movement.
@laurensvalk
The blockly issue is closed now. https://github.com/google/blockly/pull/8173 https://github.com/google/blockly/issues/6848
Thanks for the heads up! I guess we can pull it in via https://github.com/pybricks/support/issues/1572