summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--scene/gui/range.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 372e5c7d05..b6d28dce29 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2319,7 +2319,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
} break;
case FILE_EXPLORE_ANDROID_BUILD_TEMPLATES: {
- OS::get_singleton()->shell_open(String("file://") + ProjectSettings::get_singleton()->get_resource_path().plus_file("android"));
+ OS::get_singleton()->shell_open("file://" + ProjectSettings::get_singleton()->get_resource_path().plus_file("android"));
} break;
case FILE_QUIT:
case RUN_PROJECT_MANAGER: {
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index c24e62c8cb..d00acaf08a 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -63,7 +63,7 @@ void Range::Shared::emit_value_changed() {
void Range::_changed_notify(const char *p_what) {
- emit_signal("changed", shared->val);
+ emit_signal("changed");
update();
_change_notify(p_what);
}
@@ -79,6 +79,7 @@ void Range::Shared::emit_changed(const char *p_what) {
}
void Range::set_value(double p_val) {
+
if (shared->step > 0)
p_val = Math::round(p_val / shared->step) * shared->step;
@@ -303,22 +304,27 @@ bool Range::is_ratio_exp() const {
}
void Range::set_allow_greater(bool p_allow) {
+
shared->allow_greater = p_allow;
}
bool Range::is_greater_allowed() const {
+
return shared->allow_greater;
}
void Range::set_allow_lesser(bool p_allow) {
+
shared->allow_lesser = p_allow;
}
bool Range::is_lesser_allowed() const {
+
return shared->allow_lesser;
}
Range::Range() {
+
shared = memnew(Shared);
shared->min = 0;
shared->max = 100;