Skip to content

Commit

Permalink
Merge pull request godotengine#96609 from detomon/prevent-changing-re…
Browse files Browse the repository at this point in the history
…adonly-property

Prevent editing value on focus when `EditorSpinSlider` is read-only
  • Loading branch information
akien-mga committed Sep 5, 2024
2 parents a466519 + 88f1b67 commit 88ed6af
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 88ed6af

Please sign in to comment.