diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-22 12:00:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 12:00:34 +0200 |
commit | a342131eba2834240289112a1b8d5d0c68a265c9 (patch) | |
tree | c412df9c24c8b568086ea6ff72a097fb8d20dbc0 /editor/plugins | |
parent | 1e67f214c520b2c1a9fed30f78440c4e1d4d14dd (diff) | |
parent | 856a8226a5306632f5dd4d9e9c916d89e3e21495 (diff) |
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_tree_player_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp index e21ae4834d..f5d21ffb26 100644 --- a/editor/plugins/animation_tree_player_editor_plugin.cpp +++ b/editor/plugins/animation_tree_player_editor_plugin.cpp @@ -840,7 +840,7 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) { click_motion = Point2(mm->get_position().x, mm->get_position().y); update(); } - if ((mm->get_button_mask() & 4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) { + if (mm->get_button_mask() & 4 || Input::get_singleton()->is_key_pressed(KEY_SPACE)) { h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x); v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index b0502f2f7f..e5228ff1e7 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1863,7 +1863,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } // Confirm the move (only if it was moved) - if (b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT && (drag_type == DRAG_MOVE)) { + if (b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT) { if (transform.affine_inverse().xform(b->get_position()) != drag_from) { _commit_canvas_item_state(drag_selection, TTR("Move CanvasItem"), true); } |