summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/button_group.cpp3
-rw-r--r--scene/gui/label.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/scene/gui/button_group.cpp b/scene/gui/button_group.cpp
index 65cfd03505..58b323c24d 100644
--- a/scene/gui/button_group.cpp
+++ b/scene/gui/button_group.cpp
@@ -67,6 +67,9 @@ Array ButtonGroup::_get_button_list() const {
List<BaseButton*> b;
get_button_list(&b);
+
+ b.sort_custom<Node::Comparator>();
+
Array arr;
arr.resize(b.size());
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index b7918994d8..36940655d4 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -397,6 +397,7 @@ void Label::regenerate_word_cache() {
}
+
if (current=='\n') {
insert_newline=true;
} else {
@@ -446,7 +447,7 @@ void Label::regenerate_word_cache() {
}
- total_char_cache -= line_count + 1; // do not count new lines (including the first one)
+ //total_char_cache -= line_count + 1; // do not count new lines (including the first one)
if (!autowrap) {
@@ -535,7 +536,7 @@ void Label::set_percent_visible(float p_percent) {
if (p_percent<0)
set_visible_characters(-1);
else
- set_visible_characters(get_total_character_count()*p_percent);
+ set_visible_characters(get_total_character_count()*p_percent);
percent_visible=p_percent;
}