Reset view after ctrl-clicking a Panel
Using ctrl+LMB to collapse all panels except of the clicked one resulted in an empty area if done from a view that is scrolled down to some degree. Resetting the view makes this much better, although it still doesn't work that well if the area is really small, but I don't think it's worth over-complicating things here. "Feature-Request" by @maxon ;)
This commit is contained in:
parent
17b4f57bf0
commit
f50fed6a6d
|
@ -1187,9 +1187,13 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
|
|||
ED_region_tag_redraw(ar);
|
||||
}
|
||||
else { /* collapse */
|
||||
if (ctrl)
|
||||
if (ctrl) {
|
||||
panels_collapse_all(sa, ar, block->panel);
|
||||
|
||||
/* reset the view - we don't want to display a view without content */
|
||||
UI_view2d_offset(&ar->v2d, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
if (block->panel->flag & PNL_CLOSED) {
|
||||
block->panel->flag &= ~PNL_CLOSED;
|
||||
/* snap back up so full panel aligns with screen edge */
|
||||
|
|
Loading…
Reference in New Issue