Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't edit current when changing docks (reverted) #90816

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -3468,7 +3468,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 @@ -4010,14 +4012,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
Loading