mirror of
https://github.com/godotengine/godot
synced 2024-09-05 06:08:26 +00:00
Merge pull request #91168 from kitbdev/docks-dont-edit-current-v2
Don't edit current when changing docks v2
This commit is contained in:
commit
bf00e1efde
|
@ -147,7 +147,6 @@ void EditorDockManager::_update_layout() {
|
||||||
if (!dock_context_popup->is_inside_tree() || EditorNode::get_singleton()->is_exiting()) {
|
if (!dock_context_popup->is_inside_tree() || EditorNode::get_singleton()->is_exiting()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EditorNode::get_singleton()->edit_current();
|
|
||||||
dock_context_popup->docks_updated();
|
dock_context_popup->docks_updated();
|
||||||
_update_docks_menu();
|
_update_docks_menu();
|
||||||
EditorNode::get_singleton()->save_editor_layout_delayed();
|
EditorNode::get_singleton()->save_editor_layout_delayed();
|
||||||
|
|
|
@ -4024,14 +4024,16 @@ void EditorInspector::_notification(int p_what) {
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_PREDELETE: {
|
case NOTIFICATION_PREDELETE: {
|
||||||
edit(nullptr); //just in case
|
if (EditorNode::get_singleton() && !EditorNode::get_singleton()->is_exiting()) {
|
||||||
|
// Don't need to clean up if exiting, and object may already be freed.
|
||||||
|
edit(nullptr);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_EXIT_TREE: {
|
case NOTIFICATION_EXIT_TREE: {
|
||||||
if (!sub_inspector) {
|
if (!sub_inspector) {
|
||||||
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
|
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
|
||||||
}
|
}
|
||||||
edit(nullptr);
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||||
|
|
Loading…
Reference in a new issue