diff options
author | kobewi <kobewi4e@gmail.com> | 2021-07-18 01:04:27 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-07-18 01:04:27 +0200 |
commit | 110236f7617cb0b909aa0444f657344497cdaf41 (patch) | |
tree | ffbacde153abcfcc2d3631da9c3300acdf85cfec | |
parent | afc59ae84bdfdce390144af401ccf7032ce57c64 (diff) |
Fix crash in EditorSpinSlider
-rw-r--r-- | editor/editor_spin_slider.cpp | 5 | ||||
-rw-r--r-- | editor/editor_spin_slider.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 247eaab9f8..436d67b882 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -389,6 +389,11 @@ void EditorSpinSlider::_notification(int p_what) { } } +LineEdit *EditorSpinSlider::get_line_edit() { + _ensure_input_popup(); + return value_input; +} + Size2 EditorSpinSlider::get_minimum_size() const { Ref<StyleBox> sb = get_theme_stylebox("normal", "LineEdit"); Ref<Font> font = get_theme_font("font", "LineEdit"); diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index af1f385fad..5b99f88505 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -112,7 +112,7 @@ public: void set_custom_label_color(bool p_use_custom_label_color, Color p_custom_label_color); void setup_and_show() { _focus_entered(); } - LineEdit *get_line_edit() { return value_input; } + LineEdit *get_line_edit(); virtual Size2 get_minimum_size() const override; EditorSpinSlider(); |