Two bugfixes:
- When making 2d windows small (zero sized) the view2d data could get
  corrupted with NaN values. Clipped values correctly to 1.
- Search menu (ctrl+alt+f) had wrong color for selected text in text
  button
This commit is contained in:
2009-06-27 16:35:42 +00:00
parent 7b547f7ce7
commit c79e57dba8
2 changed files with 7 additions and 1 deletions

View File

@@ -1028,7 +1028,7 @@ static struct uiWidgetColors wcol_menu_back= {
{0, 0, 0, 255},
{25, 25, 25, 230},
{45, 45, 45, 230},
{255, 255, 255, 255},
{100, 100, 100, 255},
{255, 255, 255, 255},
{255, 255, 255, 255},

View File

@@ -316,6 +316,12 @@ void UI_view2d_curRect_validate(View2D *v2d)
if (v2d->keepzoom & V2D_LOCKZOOM_Y)
height= winy;
/* values used to divide, so make it safe */
if(width<1) width= 1;
if(height<1) height= 1;
if(winx<1) winx= 1;
if(winy<1) winy= 1;
/* keepzoom (V2D_KEEPZOOM set), indicates that zoom level on each axis must not exceed limits
* NOTE: in general, it is not expected that the lock-zoom will be used in conjunction with this
*/