summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/SCsub2
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/scroll_bar.cpp2
-rw-r--r--scene/main/scene_tree.cpp3
4 files changed, 5 insertions, 4 deletions
diff --git a/scene/3d/SCsub b/scene/3d/SCsub
index 90e78ba8d3..72739b527e 100644
--- a/scene/3d/SCsub
+++ b/scene/3d/SCsub
@@ -3,7 +3,7 @@
Import('env')
-if (env["disable_3d"] == "yes"):
+if env['disable_3d']:
env.scene_sources.append("3d/spatial.cpp")
env.scene_sources.append("3d/skeleton.cpp")
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 7493ea95a8..aa5ae089bf 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -534,7 +534,7 @@ void LineEdit::_notification(int p_what) {
switch (p_what) {
#ifdef TOOLS_ENABLED
case NOTIFICATION_ENTER_TREE: {
- if (Engine::get_singleton()->is_editor_hint()) {
+ if (!get_tree()->is_node_being_edited(this)) {
cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false));
cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65));
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 41f4beb1c9..6044b86ef5 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -343,7 +343,7 @@ void ScrollBar::_notification(int p_what) {
double dist = sqrt(target * target);
double vel = ((target / dist) * 500) * get_fixed_process_delta_time();
- if (vel >= dist) {
+ if (Math::abs(vel) >= dist) {
set_value(target_scroll);
} else {
set_value(get_value() + vel);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 4f62d88934..5a1388458b 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -650,7 +650,7 @@ void SceneTree::set_quit_on_go_back(bool p_enable) {
bool SceneTree::is_node_being_edited(const Node *p_node) const {
- return Engine::get_singleton()->is_editor_hint() && edited_scene_root && edited_scene_root->is_a_parent_of(p_node);
+ return Engine::get_singleton()->is_editor_hint() && edited_scene_root && (edited_scene_root->is_a_parent_of(p_node) || edited_scene_root == p_node);
}
#endif
@@ -2216,6 +2216,7 @@ void SceneTree::_bind_methods() {
BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP);
BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_WIDTH);
BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_HEIGHT);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_EXPAND);
}
SceneTree *SceneTree::singleton = NULL;