Fix #29155: Inconsistency with 0 and Del hotkeys

Use del key to reset values in widgets like color selection and histogram.
This commit is contained in:
Sergey Sharybin 2011-11-04 15:53:12 +00:00
parent 209ceb6969
commit 65f5408d75

@ -3306,7 +3306,7 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
else if (ELEM(event->type, ZEROKEY, PAD0) && event->val == KM_PRESS) {
else if (event->type == DELKEY && event->val == KM_PRESS) {
if (but->a1==UI_GRAD_V_ALT){
int len;
@ -3489,7 +3489,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
else if (ELEM(event->type, ZEROKEY, PAD0) && event->val == KM_PRESS) {
else if (event->type == DELKEY && event->val == KM_PRESS) {
int len;
/* reset only saturation */
@ -3938,7 +3938,7 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
else if (ELEM(event->type, ZEROKEY, PAD0) && event->val == KM_PRESS) {
else if (event->type == DELKEY && event->val == KM_PRESS) {
Histogram *hist = (Histogram *)but->poin;
hist->ymax = 1.f;
@ -4021,7 +4021,7 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
else if (ELEM(event->type, ZEROKEY, PAD0) && event->val == KM_PRESS) {
else if (event->type == DELKEY && event->val == KM_PRESS) {
Scopes *scopes = (Scopes *)but->poin;
scopes->wavefrm_yfac = 1.f;