pressing enter over a file-text button is ignored (so enter in the file selector...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Oct 2013 18:34:28 +0000 (18:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Oct 2013 18:34:28 +0000 (18:34 +0000)
source/blender/editors/interface/interface_handlers.c

index dbaa30d01c28b3a90ac985fe166d3aa5cde43aa4..cdce651c86034de2f827f38b48936c04bb191e65 100644 (file)
@@ -2621,7 +2621,10 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
 {
        if (data->state == BUTTON_STATE_HIGHLIGHT) {
                if (ELEM4(event->type, LEFTMOUSE, EVT_BUT_OPEN, PADENTER, RETKEY) && event->val == KM_PRESS) {
 {
        if (data->state == BUTTON_STATE_HIGHLIGHT) {
                if (ELEM4(event->type, LEFTMOUSE, EVT_BUT_OPEN, PADENTER, RETKEY) && event->val == KM_PRESS) {
-                       if (but->dt == UI_EMBOSSN && !event->ctrl) {
+                       if (ELEM(event->type, PADENTER, RETKEY) && (!ui_is_but_utf8(but))) {
+                               /* pass - allow filesel, enter to execute */
+                       }
+                       else if (but->dt == UI_EMBOSSN && !event->ctrl) {
                                /* pass */
                        }
                        else {
                                /* pass */
                        }
                        else {