Fix T43111: Node Editor (Slider) Draw Glitch

* don't allow Node Editor input max value to be less then min value
* avoid the num slider drawing glitch if softmin equals softmax
* assert if softmax/hardmax is smaller than softmin/hardmin

With this, we sort of allow softmin/hardmin and softmax/hardmax being the same.
This commit is contained in:
julianeisel
2015-01-05 21:05:17 +01:00
parent 22ce525bcd
commit e7a9bf88d2
3 changed files with 20 additions and 2 deletions

View File

@@ -2603,6 +2603,10 @@ void ui_but_update(uiBut *but)
}
}
/* max must never be smaller than min! Both being equal is allowed though */
BLI_assert(but->softmin <= but->softmax &&
but->hardmin <= but->hardmax);
/* test for min and max, icon sliders, etc */
switch (but->type) {
case UI_BTYPE_NUM: