Skip to content

Commit bf00e1e

Browse files
committed
Merge pull request godotengine#91168 from kitbdev/docks-dont-edit-current-v2
Don't edit current when changing docks v2
2 parents b1da4b2 + eefd311 commit bf00e1e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

editor/editor_dock_manager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ void EditorDockManager::_update_layout() {
147147
if (!dock_context_popup->is_inside_tree() || EditorNode::get_singleton()->is_exiting()) {
148148
return;
149149
}
150-
EditorNode::get_singleton()->edit_current();
151150
dock_context_popup->docks_updated();
152151
_update_docks_menu();
153152
EditorNode::get_singleton()->save_editor_layout_delayed();

editor/editor_inspector.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4024,14 +4024,16 @@ void EditorInspector::_notification(int p_what) {
40244024
} break;
40254025

40264026
case NOTIFICATION_PREDELETE: {
4027-
edit(nullptr); //just in case
4027+
if (EditorNode::get_singleton() && !EditorNode::get_singleton()->is_exiting()) {
4028+
// Don't need to clean up if exiting, and object may already be freed.
4029+
edit(nullptr);
4030+
}
40284031
} break;
40294032

40304033
case NOTIFICATION_EXIT_TREE: {
40314034
if (!sub_inspector) {
40324035
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
40334036
}
4034-
edit(nullptr);
40354037
} break;
40364038

40374039
case NOTIFICATION_VISIBILITY_CHANGED: {

0 commit comments

Comments
 (0)