1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #82875 from SaracenOne/disconnect_button_disable

Disable disconnect button for inherited signals
This commit is contained in:
Rémi Verschelde
2023-10-05 22:51:00 +02:00

View File

@@ -1000,7 +1000,9 @@ void ConnectionsDock::_tree_item_selected() {
} else if (item && _get_item_type(*item) == TREE_ITEM_TYPE_CONNECTION) { } else if (item && _get_item_type(*item) == TREE_ITEM_TYPE_CONNECTION) {
connect_button->set_text(TTR("Disconnect")); connect_button->set_text(TTR("Disconnect"));
connect_button->set_icon(get_editor_theme_icon(SNAME("Unlinked"))); 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 { } else {
connect_button->set_text(TTR("Connect...")); connect_button->set_text(TTR("Connect..."));
connect_button->set_icon(get_editor_theme_icon(SNAME("Instance"))); connect_button->set_icon(get_editor_theme_icon(SNAME("Instance")));