-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Scene Tree Dock: added ability to deselect items when clicking on empty space #13308
Scene Tree Dock: added ability to deselect items when clicking on empty space #13308
Conversation
5ca782f
to
b8b5bb6
Compare
does not seem vital for 3.0, wonder what others think of this feature. |
@reduz its just an slight cosmetic adjustment (as most of my PRs at the moment), thing is some what you possible expect when you click nothing - you got nothing (i.e., unselect current elements if you have any). Should not introduce any issues so in my opinion pretty safe to merge into 3.0 :) |
@@ -1923,6 +1923,9 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool | |||
c = c->next; | |||
item_h += child_h; | |||
} | |||
|
|||
if (!c && !p_mod->get_shift() && !p_mod->get_control() && !p_mod->get_command() && !click_handled && p_button != BUTTON_RIGHT) |
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.
Should this work with BUTTON_MIDDLE?
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.
Yep. I just ignore right mouse button in this case because it has popup menu
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.
But selection does not work with the MMB, so I don't see why it should with deselection
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.
Well, then it will not deselect. So nothing broken after all, right? :)
1. Removed "..", instead you now will see "Select Current Folder" and "Select this Folder" buttons. 2. Added "go to parent folder" (^) button to Save a File dialog. 3. Tree.cpp: "nothing_selected" signal has been re-made (previous implementation, merged in godotengine#13308, wasn't optimal in context of performance) 4. Fixed issue in Project Export dialog: MODE_SAVE_FILE wasn't set when you click "Export". 5. Now you can deselect items by clicking on empty space in Open a Directory dialog.
1. Removed "..", instead you now will see "Select Current Folder" and "Select this Folder" buttons. 2. Added "go to parent folder" (^) button to Save a File dialog. 3. Tree.cpp: "nothing_selected" signal has been re-made (previous implementation, merged in #13308, wasn't optimal in context of performance) 4. Fixed issue in Project Export dialog: MODE_SAVE_FILE wasn't set when you click "Export". 5. Now you can deselect items by clicking on empty space in Open a Directory dialog.
This is how it looks in action: https://i.imgur.com/tMECINu.gifv