diff options
author | julianeisel <julian_eisel@web.de> | 2015-01-05 23:05:17 +0300 |
---|---|---|
committer | julianeisel <julian_eisel@web.de> | 2015-01-05 23:05:17 +0300 |
commit | e7a9bf88d2243bead0ed1b5f9db1f21aef7ea397 (patch) | |
tree | 5a0144eff0dfed981c9c12bdf45d79802336edad /source/blender/editors/interface/interface.c | |
parent | 22ce525bcd4fe38fcc82c5ec2e07cacc89f26c12 (diff) |
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.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 38e331e6a1e..e730182ae37 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -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: |