Fix manipulator keymap initialization
Update flag was cleared before being checked when registering after load.
This commit is contained in:
@@ -83,8 +83,6 @@ static wmManipulatorGroupType *wm_manipulatorgrouptype_append__begin(void)
|
||||
{
|
||||
wmManipulatorGroupType *wgt = MEM_callocN(sizeof(wmManipulatorGroupType), "manipulatorgrouptype");
|
||||
|
||||
wgt->type_update_flag |= WM_MANIPULATORMAPTYPE_KEYMAP_INIT;
|
||||
|
||||
return wgt;
|
||||
}
|
||||
static void wm_manipulatorgrouptype_append__end(wmManipulatorGroupType *wgt)
|
||||
@@ -92,6 +90,8 @@ static void wm_manipulatorgrouptype_append__end(wmManipulatorGroupType *wgt)
|
||||
BLI_assert(wgt->name != NULL);
|
||||
BLI_assert(wgt->idname != NULL);
|
||||
|
||||
wgt->type_update_flag |= WM_MANIPULATORMAPTYPE_KEYMAP_INIT;
|
||||
|
||||
/* if not set, use default */
|
||||
if (wgt->setup_keymap == NULL) {
|
||||
if (wgt->flag & WM_MANIPULATORGROUPTYPE_SELECT) {
|
||||
|
||||
@@ -1016,13 +1016,13 @@ void WM_manipulatorconfig_update(struct Main *bmain)
|
||||
wgt_ref = wgt_ref->next)
|
||||
{
|
||||
if (wgt_ref->type->type_update_flag & WM_MANIPULATORMAPTYPE_KEYMAP_INIT) {
|
||||
wgt_ref->type->type_update_flag &= ~WM_MANIPULATORMAPTYPE_KEYMAP_INIT;
|
||||
WM_manipulatormaptype_group_init_runtime_keymap(bmain, wgt_ref->type);
|
||||
wgt_ref->type->type_update_flag &= ~WM_MANIPULATORMAPTYPE_KEYMAP_INIT;
|
||||
}
|
||||
|
||||
if (wgt_ref->type->type_update_flag & WM_MANIPULATORMAPTYPE_UPDATE_INIT) {
|
||||
wgt_ref->type->type_update_flag &= ~WM_MANIPULATORMAPTYPE_UPDATE_INIT;
|
||||
WM_manipulatormaptype_group_init_runtime(bmain, mmap_type, wgt_ref->type);
|
||||
wgt_ref->type->type_update_flag &= ~WM_MANIPULATORMAPTYPE_UPDATE_INIT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user