From 4b9e65da7369e0941a85cacfe76dfdfe68c97732 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 20 Jun 2025 15:49:15 +0200 Subject: [PATCH] Swap UID and path buttons --- editor/editor_properties.cpp | 12 ++++++------ editor/editor_properties.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 652e06fb50..cc444cf042 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -719,12 +719,6 @@ EditorPropertyPath::EditorPropertyPath() { path->connect(SceneStringName(focus_exited), callable_mp(this, &EditorPropertyPath::_path_focus_exited)); path->set_h_size_flags(SIZE_EXPAND_FILL); - path_edit = memnew(Button); - path_edit->set_accessibility_name(TTRC("Edit")); - path_hb->add_child(path_edit); - add_focusable(path); - path_edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyPath::_path_pressed)); - toggle_uid = memnew(Button); toggle_uid->set_accessibility_name(TTRC("Toggle Display UID")); toggle_uid->set_tooltip_text(TTRC("Toggles displaying between path and UID.\nThe UID is the actual value of this property.")); @@ -732,6 +726,12 @@ EditorPropertyPath::EditorPropertyPath() { path_hb->add_child(toggle_uid); add_focusable(toggle_uid); toggle_uid->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyPath::_toggle_uid_display)); + + path_edit = memnew(Button); + path_edit->set_accessibility_name(TTRC("Edit")); + path_hb->add_child(path_edit); + add_focusable(path); + path_edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyPath::_path_pressed)); } ///////////////////// CLASS NAME ///////////////////////// diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 256ab56aa1..cc5b762f8d 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -162,12 +162,12 @@ class EditorPropertyPath : public EditorProperty { bool global = false; bool save_mode = false; bool enable_uid = false; - bool display_uid = true; + bool display_uid = false; EditorFileDialog *dialog = nullptr; LineEdit *path = nullptr; - Button *path_edit = nullptr; Button *toggle_uid = nullptr; + Button *path_edit = nullptr; String _get_path_text(bool p_allow_uid = false);