Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Make Instant Preview work for first selection after being enabled

Malcolm Anderson5f8ac5d96b88
diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp
index 24e8f7915d4..c93a45b0bb8 100644
--- a/editor/gui/editor_quick_open_dialog.cpp
+++ b/editor/gui/editor_quick_open_dialog.cpp
@@ -209,15 +209,14 @@ bool EditorQuickOpenDialog::_is_instant_preview_active() const {
}
void EditorQuickOpenDialog::selection_changed() {
- if (!_is_instant_preview_active()) {
- return;
- }
-
// This prevents the property from being changed the first time the Quick Open
// window is opened.
if (!initial_selection_performed) {
initial_selection_performed = true;
- } else {
+ return;
+ }
+
+ if (_is_instant_preview_active()) {
preview_property();
}
}