Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulianeisel <julian_eisel@web.de>2015-01-05 23:05:17 +0300
committerjulianeisel <julian_eisel@web.de>2015-01-05 23:05:17 +0300
commite7a9bf88d2243bead0ed1b5f9db1f21aef7ea397 (patch)
tree5a0144eff0dfed981c9c12bdf45d79802336edad /source/blender/editors/interface/interface.c
parent22ce525bcd4fe38fcc82c5ec2e07cacc89f26c12 (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.c4
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: