diff options
author | Hans Goudey <h.goudey@me.com> | 2020-05-20 23:27:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-05-20 23:27:44 +0300 |
commit | 71fa4601452756f3b4a26b51ec44f13edbf2e9a8 (patch) | |
tree | 5ede357ec908ed76a38fb206a751b93c05fc1f47 | |
parent | 6d7dc2265f1b3d95f6c442d5fe211058a5f56a58 (diff) |
UI: Remove Panel Grid Snapping While Dragging
The reason to have this isn't quite clear, but it looks like a vestige
of the 2.5 transition. Removing this makes dragging panels feel
much more responsive.
Thanks to Julian Eisel @Severin for the original change.
Differential Revision: https://developer.blender.org/D7803
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 3748dbab519..5b68ccf9e7c 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -105,7 +105,6 @@ extern const char ui_radial_dir_to_numpad[8]; extern const short ui_radial_dir_to_angle[8]; /* internal panel drawing defines */ -#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */ #define PNL_HEADER (UI_UNIT_Y * 1.2) /* 24 default */ /* bit button defines */ diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 04179721305..c5f67e63bd3 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1322,8 +1322,8 @@ static void ui_do_drag(const bContext *C, const wmEvent *event, Panel *panel) return; } - dx = (event->x - data->startx) & ~(PNL_GRID - 1); - dy = (event->y - data->starty) & ~(PNL_GRID - 1); + dx = (event->x - data->startx); + dy = (event->y - data->starty); dx *= (float)BLI_rctf_size_x(®ion->v2d.cur) / (float)BLI_rcti_size_x(®ion->winrct); dy *= (float)BLI_rctf_size_y(®ion->v2d.cur) / (float)BLI_rcti_size_y(®ion->winrct); |