summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/popup_menu.cpp6
-rw-r--r--scene/gui/range.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index cdc6b868ec..e81813d7a5 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1071,6 +1071,9 @@ void PopupMenu::activate_item(int p_item) {
pop = Object::cast_to<PopupMenu>(next);
}
+ emit_signal("id_pressed", id);
+ emit_signal("index_pressed", p_item);
+
// Hides popup by default; unless otherwise specified
// by using set_hide_on_item_selection and set_hide_on_checkable_item_selection
@@ -1084,9 +1087,6 @@ void PopupMenu::activate_item(int p_item) {
return;
hide();
-
- emit_signal("id_pressed", id);
- emit_signal("index_pressed", p_item);
}
void PopupMenu::remove_item(int p_idx) {
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 4062e48640..09d8664240 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -260,8 +260,8 @@ void Range::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "allow_greater"), "set_allow_greater", "is_greater_allowed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "allow_lesser"), "set_allow_lesser", "is_lesser_allowed");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_greater"), "set_allow_greater", "is_greater_allowed");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_lesser"), "set_allow_lesser", "is_lesser_allowed");
}
void Range::set_use_rounded_values(bool p_enable) {