summaryrefslogtreecommitdiff
path: root/editor/editor_spin_slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r--editor/editor_spin_slider.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 509a316ef3..9bf3c4c590 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -346,7 +346,7 @@ void EditorSpinSlider::_draw_spin_slider() {
text_ofs.x += glyphs[i].advance;
}
}
- TS->free(num_rid);
+ TS->free_rid(num_rid);
if (get_step() == 1) {
Ref<Texture2D> updown2 = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
@@ -443,6 +443,7 @@ void EditorSpinSlider::_notification(int p_what) {
case NOTIFICATION_WM_WINDOW_FOCUS_IN:
case NOTIFICATION_WM_WINDOW_FOCUS_OUT:
+ case NOTIFICATION_WM_CLOSE_REQUEST:
case NOTIFICATION_EXIT_TREE: {
if (grabbing_spinner) {
grabber->hide();
@@ -655,14 +656,10 @@ void EditorSpinSlider::_ensure_input_popup() {
}
EditorSpinSlider::EditorSpinSlider() {
- flat = false;
- grabbing_spinner_attempt = false;
- grabbing_spinner = false;
grabbing_spinner_dist_cache = 0;
pre_grab_value = 0;
set_focus_mode(FOCUS_ALL);
updown_offset = -1;
- hover_updown = false;
grabber = memnew(TextureRect);
add_child(grabber);
grabber->hide();
@@ -671,12 +668,5 @@ EditorSpinSlider::EditorSpinSlider() {
grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
- mouse_over_spin = false;
- mouse_over_grabber = false;
- mousewheel_over_grabber = false;
- grabbing_grabber = false;
grabber_range = 1;
- value_input_just_closed = false;
- hide_slider = false;
- read_only = false;
}