-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds move selection feature #1647
base: master
Are you sure you want to change the base?
Conversation
I'm a little bit surprised by that it automatically applies the move when I release the mouse button. Why doesn't it stay in a floating state, like the movement tool used to do? Also I wonder if it's really needed to have Ctrl+Alt as modifier for this. I realize GIMP uses the same modifier, but they also handle just Alt for moving the selection without affecting the image. Either we could eventually also support Alt like that in Tiled, or we could try using just Alt for doing the drag. Or, we could try whether it would work without modifier, just going by "if you start dragging on the selection, without modifier". What do you think? |
I like the option of just using Alt. Without using the modifer, might get a bit weird and a lot of tricky situations might come I think. |
@@ -41,6 +43,7 @@ class AbstractTileSelectionTool : public AbstractTileTool | |||
const QKeySequence &shortcut, | |||
QObject *parent = nullptr); | |||
|
|||
void mouseMoved(const QPointF &pos,Qt::KeyboardModifiers modifiers) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space missing after ,
here
What is the status on this by the way? |
* Holding Alt is enough to do a drag. No need to click inside the selection. * Releasing either Alt or the mouse does not anchor the floating selection, so it can be dragged repeatedly. * The selection is anchored when the tool gets deactivated, you click outside of the floating selection or press Enter.
I've pushed a commit with several changes. Unfortunately, I still don't think we can merge this to
Maybe I'm making it too complicated by allowing repeated drags, but I think it needs to be supported because users will expect it to work and they will need it to work when they need to take the selection somewhere outside of their screen (or revert back to using copy/paste of course). I think we should look again at other editors to see how they behave regarding such a feature. |
Maybe the move selection can have a logic similar to object selection tool. It can have the rotating ants animation as well, which would make the feature quite easy to use and understand. |
384d5ac
to
2e9a0fb
Compare
#650
The tool works when an area is selected and then Ctrl+Alt is used to move the selection. Ctrl+Alt+Shift is used to duplicate the selection but this modifer works weirdly (You need to hold Ctrl+Alt and after that the shift).