UI: check if only ctrl is pressed when editing label

Previously, the code only checked that ctrl is pressed. This works, but
also allows other keys to be hold at the same time which might conflict
with other shortcuts. Now the code also makes sure that shift and alt
are not pressed.
This commit is contained in:
Jacques Lucke
2024-05-30 11:14:53 +02:00
parent 12a5b2977f
commit cc38c43198

View File

@@ -4749,7 +4749,7 @@ static int ui_do_but_TEX(
/* Pass, allow file-selector, enter to execute. */
}
else if (ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS) &&
((event->modifier & KM_CTRL) == 0))
((event->modifier & (KM_CTRL | KM_SHIFT | KM_ALT)) != KM_CTRL))
{
/* Pass. */
}