Small UI Tweak: Added NumPad-0 as additional hotkey for Reset to Default Values. Previously, only ZeroKey (i.e. 0 on top row) was used, which was not very convenient to hit)

This commit is contained in:
2010-08-12 09:50:04 +00:00
parent cf84992cb4
commit e2826f379d

View File

@@ -4262,7 +4262,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
return WM_UI_HANDLER_BREAK;
}
/* reset to default */
else if(event->type == ZEROKEY && event->val == KM_PRESS) {
else if(ELEM(event->type, ZEROKEY,PAD0) && event->val == KM_PRESS) {
if (!(ELEM3(but->type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
ui_set_but_default(C, but);
}