diff options
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 11 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 12 |
2 files changed, 1 insertions, 22 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index e5628ff952e..d69e1e748d9 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1942,9 +1942,6 @@ static void ui_do_drag(const bContext *C, const wmEvent *event, Panel *panel) dx *= BLI_rctf_size_x(®ion->v2d.cur) / (float)BLI_rcti_size_x(®ion->winrct); dy *= BLI_rctf_size_y(®ion->v2d.cur) / (float)BLI_rcti_size_y(®ion->winrct); - /* Reset the panel snapping, to allow dragging away from snapped edges. */ - panel->snap = PNL_SNAP_NONE; - /* Add the movement of the view due to edge scrolling while dragging. */ dx += ((float)region->v2d.cur.xmin - data->start_cur_xmin); dy += ((float)region->v2d.cur.ymin - data->start_cur_ymin); @@ -2154,21 +2151,13 @@ static void ui_handle_panel_header(const bContext *C, if (UI_panel_is_closed(panel)) { panel->flag &= ~PNL_CLOSED; - /* Snap back up so full panel aligns with screen edge. */ - if (panel->snap & PNL_SNAP_BOTTOM) { - panel->ofsy = 0; - } if (event_type == LEFTMOUSE) { ui_panel_drag_collapse_handler_add(C, false); } } else { - /* Snap down to bottom screen edge. */ panel->flag |= PNL_CLOSED; - if (panel->snap & PNL_SNAP_BOTTOM) { - panel->ofsy = -panel->sizey; - } if (event_type == LEFTMOUSE) { ui_panel_drag_collapse_handler_add(C, true); diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index bf57dd9ab77..02c0fcbb887 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -170,9 +170,8 @@ typedef struct Panel { /** Panel size excluding children. */ int blocksizex, blocksizey; short labelofs; - char _pad[4]; short flag, runtime_flag; - short snap; + char _pad[6]; /** Panels are aligned according to increasing sort-order. */ int sortorder; /** Runtime for panel manipulation. */ @@ -572,15 +571,6 @@ enum { PNL_INSTANCED_LIST_ORDER_CHANGED = (1 << 7), }; -/** #Panel.snap - for snapping to screen edges */ -#define PNL_SNAP_NONE 0 -/* #define PNL_SNAP_TOP 1 */ -/* #define PNL_SNAP_RIGHT 2 */ -#define PNL_SNAP_BOTTOM 4 -/* #define PNL_SNAP_LEFT 8 */ - -/* #define PNL_SNAP_DIST 9.0 */ - /* paneltype flag */ enum { PNL_DEFAULT_CLOSED = (1 << 0), |