Skip to content

Commit

Permalink
Disable disconnect button for inherited signals
Browse files Browse the repository at this point in the history
  • Loading branch information
SaracenOne committed Oct 5, 2023
1 parent 0ca8542 commit 054934f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/connections_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,9 @@ void ConnectionsDock::_tree_item_selected() {
} else if (item && _get_item_type(*item) == TREE_ITEM_TYPE_CONNECTION) {
connect_button->set_text(TTR("Disconnect"));
connect_button->set_icon(get_editor_theme_icon(SNAME("Unlinked")));
connect_button->set_disabled(false);

Object::Connection connection = item->get_metadata(0);
connect_button->set_disabled(_is_connection_inherited(connection));
} else {
connect_button->set_text(TTR("Connect..."));
connect_button->set_icon(get_editor_theme_icon(SNAME("Instance")));
Expand Down

0 comments on commit 054934f

Please sign in to comment.