diff options
| author | Rémi Verschelde | 2017-05-28 10:04:56 +0200 |
|---|---|---|
| committer | GitHub | 2017-05-28 10:04:56 +0200 |
| commit | c814d65fae9841810e0ea28e24f806187fbd63ed (patch) | |
| tree | f026d461da73da59acaa841087393debc4c21d5f | |
| parent | 8125bbba5986008bd528b1680d1983e6abb69f3e (diff) | |
| parent | f460f82ec1dc6df21be181308d06ee83306eaed7 (diff) | |
| download | godot-c814d65fae9841810e0ea28e24f806187fbd63ed.tar.gz godot-c814d65fae9841810e0ea28e24f806187fbd63ed.tar.zst godot-c814d65fae9841810e0ea28e24f806187fbd63ed.zip | |
| -rw-r--r-- | editor/plugins/path_2d_editor_plugin.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index f8d250334..73d5b2888 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -94,16 +94,14 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { // Check for point movement start (for point + in/out controls). if (mb->get_button_index() == BUTTON_LEFT) { - if (!mb->get_shift() && mode == MODE_EDIT) { - // Point can only be moved in edit mode. - if (dist_to_p < grab_threshold) { + if (mode == MODE_EDIT && !mb->get_shift() && dist_to_p < grab_threshold) { + // Points can only be moved in edit mode. - action = ACTION_MOVING_POINT; - action_point = i; - moving_from = curve->get_point_pos(i); - moving_screen_from = gpoint; - return true; - } + action = ACTION_MOVING_POINT; + action_point = i; + moving_from = curve->get_point_pos(i); + moving_screen_from = gpoint; + return true; } else if (mode == MODE_EDIT || mode == MODE_EDIT_CURVE) { // In/out controls can be moved in multiple modes. if (dist_to_p_out < grab_threshold && i < (curve->get_point_count() - 1)) { |
