forked from bartvdbraak/blender
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:
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user