Skip to content

Commit

Permalink
Prevent editing value on focus when EditorSpinSlider is read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
detomon committed Sep 5, 2024
1 parent b6223c0 commit 88f1b67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/gui/editor_spin_slider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 88f1b67

Please sign in to comment.