Skip to content

Commit

Permalink
Merge pull request #90816 from kitbdev/dock-dont-edit-current
Browse files Browse the repository at this point in the history
Don't edit current when changing docks
  • Loading branch information
akien-mga committed Apr 22, 2024
2 parents 6cf03a5 + 55711b2 commit 8ab5ab1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion editor/editor_dock_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ void EditorDockManager::_update_layout() {
if (!dock_context_popup->is_inside_tree() || EditorNode::get_singleton()->is_exiting()) {
return;
}
EditorNode::get_singleton()->edit_current();
dock_context_popup->docks_updated();
_update_docks_menu();
EditorNode::get_singleton()->save_editor_layout_delayed();
Expand Down
7 changes: 4 additions & 3 deletions editor/editor_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,9 @@ void EditorInspector::edit(Object *p_object) {
next_object = p_object; // Some plugins need to know the next edited object when clearing the inspector.
if (object) {
_clear();
object->disconnect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
if (object->is_connected("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback))) {
object->disconnect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
}
}
per_array_page.clear();

Expand Down Expand Up @@ -4019,14 +4021,13 @@ void EditorInspector::_notification(int p_what) {
} break;

case NOTIFICATION_PREDELETE: {
edit(nullptr); //just in case
edit(nullptr);
} break;

case NOTIFICATION_EXIT_TREE: {
if (!sub_inspector) {
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
edit(nullptr);
} break;

case NOTIFICATION_VISIBILITY_CHANGED: {
Expand Down

0 comments on commit 8ab5ab1

Please sign in to comment.