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...
This commit is contained in:
parent
c2045ef794
commit
330272be9a
Notes:
blender-bot
2023-02-14 11:02:40 +01:00
Referenced by issue #39060, "Choose by numbers" do not work with Enum-menus, but work with operators-menus
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue