summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRindbee <idleman@yeah.net>2022-06-25 15:39:39 +0800
committerRindbee <idleman@yeah.net>2022-06-25 15:39:39 +0800
commitc10304415fbdaa079c817a37c242055e79ef4cc8 (patch)
tree92806cf1546657f766281ce5efd87cbaf3104772 /scene
parentc87f9fe4cec15dcfa8ddb68e2de55d2bfab40d32 (diff)
Fix ProgressBar's minimum size not updating when toggling its percent_visible
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/progress_bar.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index f36682942f..80859e8eb9 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -126,7 +126,11 @@ int ProgressBar::get_fill_mode() {
}
void ProgressBar::set_percent_visible(bool p_visible) {
+ if (percent_visible == p_visible) {
+ return;
+ }
percent_visible = p_visible;
+ update_minimum_size();
update();
}