Skip to content

Commit

Permalink
Fix bug that translates node during region select over geometry by al…
Browse files Browse the repository at this point in the history
…ways defaulting to region select
  • Loading branch information
ryevdokimov committed Feb 4, 2024
1 parent b4e2a24 commit 6718a9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1985,9 +1985,8 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} else {
const bool movement_threshold_passed = _edit.original_mouse_pos.distance_to(_edit.mouse_pos) > 8 * EDSCALE;

// enable region-select if nothing has been selected yet or multi-select (shift key) is active
if (selection_in_progress && movement_threshold_passed) {
if (get_selected_count() == 0 || clicked_wants_append) {
if (selection_in_progress && movement_threshold_passed && clicked.is_valid()) {
if (clicked_wants_append || !editor_selection->is_selected(Object::cast_to<Node>(ObjectDB::get_instance(clicked)))) {
cursor.region_select = true;
cursor.region_begin = _edit.original_mouse_pos;
clicked = ObjectID();
Expand Down

0 comments on commit 6718a9e

Please sign in to comment.