add comment about misuse of enum set function.
This commit is contained in:
@@ -635,12 +635,19 @@ static void rna_wmKeyMapItem_keymodifier_set(PointerRNA *ptr, int value)
|
|||||||
{
|
{
|
||||||
wmKeyMapItem *kmi = ptr->data;
|
wmKeyMapItem *kmi = ptr->data;
|
||||||
|
|
||||||
if (value == ESCKEY);
|
/* XXX, this should really be managed in an _itemf function,
|
||||||
else if (value >= AKEY)
|
* giving a list of valid enums, then silently changing them when they are set is not
|
||||||
|
* a good precedent, don't do this unless you have a good reason! */
|
||||||
|
if (value == ESCKEY) {
|
||||||
|
/* pass */
|
||||||
|
}
|
||||||
|
else if (value >= AKEY) {
|
||||||
kmi->keymodifier = value;
|
kmi->keymodifier = value;
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
kmi->keymodifier = 0;
|
kmi->keymodifier = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
|
static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
|
||||||
|
Reference in New Issue
Block a user