Skip to content

Commit eefd311

Browse files
committed
Don't edit current when changing docks v2
1 parent 11d3768 commit eefd311

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
@@ -4019,14 +4019,16 @@ void EditorInspector::_notification(int p_what) {
40194019
} break;
40204020

40214021
case NOTIFICATION_PREDELETE: {
4022-
edit(nullptr); //just in case
4022+
if (EditorNode::get_singleton() && !EditorNode::get_singleton()->is_exiting()) {
4023+
// Don't need to clean up if exiting, and object may already be freed.
4024+
edit(nullptr);
4025+
}
40234026
} break;
40244027

40254028
case NOTIFICATION_EXIT_TREE: {
40264029
if (!sub_inspector) {
40274030
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
40284031
}
4029-
edit(nullptr);
40304032
} break;
40314033

40324034
case NOTIFICATION_VISIBILITY_CHANGED: {

0 commit comments

Comments
 (0)