소스 검색

Merge pull request #82875 from SaracenOne/disconnect_button_disable

Disable disconnect button for inherited signals
Rémi Verschelde 2 년 전
부모
커밋
4c799d44d0
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      editor/connections_dialog.cpp

+ 3 - 1
editor/connections_dialog.cpp

@@ -1000,7 +1000,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")));