Browse Source

Fix error with a specific dock layout

volzhs 6 years ago
parent
commit
9f62f79dbb

+ 2 - 0
editor/editor_help.cpp

@@ -252,6 +252,8 @@ void EditorHelpSearch::_notification(int p_what) {
 
 
 		connect("confirmed", this, "_confirmed");
 		connect("confirmed", this, "_confirmed");
 		_update_search();
 		_update_search();
+	} else if (p_what == NOTIFICATION_EXIT_TREE) {
+		disconnect("confirmed", this, "_confirmed");
 	} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
 	} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
 
 
 		if (is_visible_in_tree()) {
 		if (is_visible_in_tree()) {

+ 3 - 0
editor/plugins/script_editor_plugin.cpp

@@ -210,6 +210,9 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
 			search_box->set_right_icon(get_icon("Search", "EditorIcons"));
 			search_box->set_right_icon(get_icon("Search", "EditorIcons"));
 			search_box->set_clear_button_enabled(true);
 			search_box->set_clear_button_enabled(true);
 		} break;
 		} break;
+		case NOTIFICATION_EXIT_TREE: {
+			disconnect("confirmed", this, "_confirmed");
+		} break;
 	}
 	}
 }
 }
 
 

+ 2 - 0
editor/property_selector.cpp

@@ -394,6 +394,8 @@ void PropertySelector::_notification(int p_what) {
 	if (p_what == NOTIFICATION_ENTER_TREE) {
 	if (p_what == NOTIFICATION_ENTER_TREE) {
 
 
 		connect("confirmed", this, "_confirmed");
 		connect("confirmed", this, "_confirmed");
+	} else if (p_what == NOTIFICATION_EXIT_TREE) {
+		disconnect("confirmed", this, "_confirmed");
 	}
 	}
 }
 }
 
 

+ 2 - 0
editor/quick_open.cpp

@@ -261,6 +261,8 @@ void EditorQuickOpen::_notification(int p_what) {
 
 
 		search_box->set_right_icon(get_icon("Search", "EditorIcons"));
 		search_box->set_right_icon(get_icon("Search", "EditorIcons"));
 		search_box->set_clear_button_enabled(true);
 		search_box->set_clear_button_enabled(true);
+	} else if (p_what == NOTIFICATION_EXIT_TREE) {
+		disconnect("confirmed", this, "_confirmed");
 	}
 	}
 }
 }