summaryrefslogtreecommitdiff
path: root/scene/gui/split_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/split_container.cpp')
-rw-r--r--scene/gui/split_container.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index d7aa516ee6..b7e1f2a914 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -95,7 +95,7 @@ void SplitContainer::_resort() {
no_offset_middle_sep = ms_first[axis];
}
- // Compute the final middle separation
+ // Compute the final middle separation.
middle_sep = no_offset_middle_sep;
if (!collapsed) {
int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, (get_size()[axis] - ms_second[axis] - sep) - no_offset_middle_sep);
@@ -124,7 +124,7 @@ void SplitContainer::_resort() {
}
}
- update();
+ queue_redraw();
}
Size2 SplitContainer::get_minimum_size() const {
@@ -176,7 +176,7 @@ void SplitContainer::_notification(int p_what) {
case NOTIFICATION_MOUSE_EXIT: {
mouse_inside = false;
if (get_theme_constant(SNAME("autohide"))) {
- update();
+ queue_redraw();
}
} break;
@@ -256,7 +256,7 @@ void SplitContainer::gui_input(const Ref<InputEvent> &p_event) {
if (mouse_inside != mouse_inside_state) {
mouse_inside = mouse_inside_state;
if (get_theme_constant(SNAME("autohide"))) {
- update();
+ queue_redraw();
}
}
@@ -327,9 +327,13 @@ void SplitContainer::set_collapsed(bool p_collapsed) {
}
void SplitContainer::set_dragger_visibility(DraggerVisibility p_visibility) {
+ if (dragger_visibility == p_visibility) {
+ return;
+ }
+
dragger_visibility = p_visibility;
queue_sort();
- update();
+ queue_redraw();
}
SplitContainer::DraggerVisibility SplitContainer::get_dragger_visibility() const {