[Bf-blender-cvs] [330272b] master: Fix T39060: "Choose by numbers" do not work with Enum-menus, but work with operators-menus
Bastien Montagne
noreply at git.blender.org
Tue Mar 11 21:11:04 CET 2014
Commit: 330272be9ad2959f3ba63f568538a94d5c487160
Author: Bastien Montagne
Date: Tue Mar 11 21:06:03 2014 +0100
https://developer.blender.org/rB330272be9ad2959f3ba63f568538a94d5c487160
Fix T39060: "Choose by numbers" do not work with Enum-menus, but work with operators-menus
The "layer" exception in handling numbers for menus was a bit too much greedy, eating numbers for all RNA props instead of just for layers ones...
===================================================================
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 24aa238..8ead084 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7984,16 +7984,17 @@ static int ui_handle_menu_event(bContext *C, const wmEvent *event, uiPopupBlockH
count++;
/* exception for rna layer buts */
- if (but->rnapoin.data && but->rnaprop) {
- if (ELEM(RNA_property_subtype(but->rnaprop), PROP_LAYER, PROP_LAYER_MEMBER)) {
- if (but->rnaindex == act - 1)
- doit = true;
+ if (but->rnapoin.data && but->rnaprop &&
+ ELEM(RNA_property_subtype(but->rnaprop), PROP_LAYER, PROP_LAYER_MEMBER))
+ {
+ if (but->rnaindex == act - 1) {
+ doit = true;
}
}
else if (count == act) {
doit = true;
}
-
+
if (doit) {
/* activate buttons but open menu's */
uiButtonActivateType activate;
More information about the Bf-blender-cvs
mailing list