Skip to content
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

Merged

Conversation

Krakean
Copy link
Contributor

@Krakean Krakean commented Nov 26, 2017

This is how it looks in action: https://i.imgur.com/tMECINu.gifv

@reduz
Copy link
Member

reduz commented Nov 26, 2017

does not seem vital for 3.0, wonder what others think of this feature.

@Krakean
Copy link
Contributor Author

Krakean commented Nov 26, 2017

@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)
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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? :)

@akien-mga akien-mga merged commit 17b4f43 into godotengine:master Nov 27, 2017
@Krakean Krakean deleted the scenetreedock_additemsdeselect branch November 27, 2017 13:50
Krakean added a commit to Krakean/godot that referenced this pull request Nov 27, 2017
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.
akien-mga pushed a commit that referenced this pull request Nov 27, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants