From 88f1b679f3dd0b66105b29f683fa3dbc0d0686de Mon Sep 17 00:00:00 2001 From: detomon Date: Sun, 14 Jul 2024 13:53:33 +0200 Subject: [PATCH] Prevent editing value on focus when `EditorSpinSlider` is read-only --- editor/gui/editor_spin_slider.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/gui/editor_spin_slider.cpp b/editor/gui/editor_spin_slider.cpp index 5372d33b4c1..731f6826050 100644 --- a/editor/gui/editor_spin_slider.cpp +++ b/editor/gui/editor_spin_slider.cpp @@ -665,6 +665,10 @@ bool EditorSpinSlider::is_grabbing() const { } void EditorSpinSlider::_focus_entered() { + if (is_read_only()) { + return; + } + _ensure_input_popup(); value_input->set_text(get_text_value()); value_input_popup->set_size(get_size());