[#11152] [C] key shortcut is broken in UV/Image Editor
[blender.git] / source / blender / src / drawimage.c
index 09ba518565fd10674b8ae22ffeb9cb0a611653e6..d8e94bd2ff7bbc7589de5373c391f6dae4580d4f 100644 (file)
@@ -1485,7 +1485,11 @@ static void image_panel_paint(short cntrl)       // IMAGE_HANDLER_PAINT
        uiBlock *block;
        ID *id;
        int yco, xco, butw;
-
+       
+       if ((G.sima->image && (G.sima->flag & SI_DRAWTOOL))==0) {
+               return;
+       }
+       
        block= uiNewBlock(&curarea->uiblocks, "image_panel_paint", UI_EMBOSS, UI_HELV, curarea->win);
        uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
        uiSetPanelHandler(IMAGE_HANDLER_PAINT);  // for close and esc