summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-11-03 23:57:07 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-11-07 01:21:25 +0100
commit18978881fef542f47b4bc34508ef21607f35f49e (patch)
tree76ca177824256f63c7bed360ae70840ebf276f2d /scene/gui
parentf814e15c7f60a685e8b3623fc93231c18ccd3627 (diff)
Code simplifications
CanvasItemEditor: - p_result == ADD_MOVE is always true in this switch-clause - both parts of the if-else-clause do the same thing and simplified an affine_inverse call ControlEditorToolbar: - private function ControlEditorToolbar::_anchor_to_position is used nowhere. Looks like copy and paste from CanvasItemEditor::_anchor_to_position ScrollContainer: - screen_is_touchscreen is always true, because otherwise the function already returned TextLine: - both parts of the if-else-clause do the same thing and simplified return statement
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/scroll_container.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index ec34a8d26d..531226f938 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -182,14 +182,12 @@ void ScrollContainer::gui_input(const Ref<InputEvent> &p_gui_input) {
drag_accum = Vector2();
last_drag_accum = Vector2();
drag_from = Vector2(prev_h_scroll, prev_v_scroll);
- drag_touching = screen_is_touchscreen;
+ drag_touching = true;
drag_touching_deaccel = false;
beyond_deadzone = false;
time_since_motion = 0;
- if (drag_touching) {
- set_physics_process_internal(true);
- time_since_motion = 0;
- }
+ set_physics_process_internal(true);
+ time_since_motion = 0;
} else {
if (drag_touching) {