You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Tweak editor select mode drag threshold for better usability
- Use a smaller drag threshold (8 pixels instead of 10 pixels). - Scale the 2D editor drag threshold with the zoom to make it work the same regardless of the current zoom level.
This commit is contained in:
@@ -2324,7 +2324,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
if (m.is_valid()) {
|
||||
Point2 click = transform.affine_inverse().xform(m->get_position());
|
||||
bool movement_threshold_passed = drag_start_origin.distance_to(click) > 10 * EDSCALE;
|
||||
bool movement_threshold_passed = drag_start_origin.distance_to(click) > (8 * MAX(1, EDSCALE)) / zoom;
|
||||
if (m.is_valid() && movement_threshold_passed) {
|
||||
List<CanvasItem *> selection2 = _get_edited_canvas_items();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user