[Bf-blender-cvs] [30bfa991f87] blender-v2.83-release: Fix invalid comparison checking button unit type

Campbell Barton noreply at git.blender.org
Mon Apr 20 03:58:09 CEST 2020


Commit: 30bfa991f87b9ead6d4f8f9a87322c4aeb9e99d4
Author: Campbell Barton
Date:   Mon Apr 20 11:54:47 2020 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rB30bfa991f87b9ead6d4f8f9a87322c4aeb9e99d4

Fix invalid comparison checking button unit type

Checking button unit type was length for proportional
multi-button adjustment wasn't working.

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d2ae044ea46..b392c9f6768 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1282,7 +1282,7 @@ static void ui_multibut_states_create(uiBut *but_active, uiHandleButtonData *dat
    * note: if we mix buttons which are proportional and others which are not,
    * this may work a bit strangely */
   if ((but_active->rnaprop && (RNA_property_flag(but_active->rnaprop) & PROP_PROPORTIONAL)) ||
-      ELEM(but_active->unit_type, PROP_UNIT_LENGTH)) {
+      ELEM(but_active->unit_type, RNA_SUBTYPE_UNIT_VALUE(PROP_UNIT_LENGTH))) {
     if (data->origvalue != 0.0) {
       data->multi_data.is_proportional = true;
     }



More information about the Bf-blender-cvs mailing list