-
-
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
Fix Connection dock's popups always allowing disconnect #81750
Fix Connection dock's popups always allowing disconnect #81750
Conversation
874fc5e
to
e85b99c
Compare
This fix looks necessary for the |
e85b99c
to
ff99226
Compare
That is correct. The issue was just less apparent because most item options worked regardless. I pushed a fix for the signal item type as well. |
Maybe do this above, for future proofing? And you can also add a comment. TreeItem *item = tree->get_item_at_position(mb_event->get_position());
if (!item) {
return;
}
+
+ if (item->is_selectable(0)) {
+ tree->set_selected(item);
+ } |
efbad5a
to
281b0bb
Compare
Sure thing. I tested it again and it worked identically. A comment, too. |
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.
I haven't tested this, but it makes sense to me and I trust @Mickeon. Thank you!
281b0bb
to
4471e7f
Compare
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.
tbh this code should be reworked to use item_mouse_selected
instead of gui_input
, but for now this solution works.
This was changed in #81221 because class items are not selectable. |
Thanks! |
Fixes the issue described in this comment as a regression from #81221.
A Connection Dock's TreeItem needs to be selected for the connection's PopupMenu, called
slot_menu
to update accordingly on the spot. However, this doesn't happen. It means that it is either possible to disconnect inherited signals, or the opposite, at seemingly completely random. This PR fixes that.