UI: small further tweak to last region expand/collapse fix, when moving the

operator redo panel up now it no longer hides the region, just stops it at
max size.
This commit is contained in:
Brecht Van Lommel 2011-12-23 13:53:21 +00:00
parent 0f283e5393
commit 217a7d1829

@ -1742,11 +1742,13 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
/* note, 'UI_UNIT_Y/4' means you need to drag the header almost
* all the way down for it to become hidden, this is done
* otherwise its too easy to do this by accident */
if(rmd->ar->sizey < UI_UNIT_Y/4 || (maxsize > 0 && (rmd->ar->sizey > maxsize)) ) {
if(rmd->ar->sizey < UI_UNIT_Y/4) {
rmd->ar->sizey= rmd->origval;
if(!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
else if(maxsize > 0 && (rmd->ar->sizey > maxsize))
rmd->ar->sizey= maxsize;
else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
region_scale_toggle_hidden(C, rmd);
}