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
This commit is contained in:
Markus Sauermann
2022-11-03 23:57:07 +01:00
parent f814e15c7f
commit 18978881fe
5 changed files with 10 additions and 38 deletions

View File

@@ -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) {