Revision: 14824
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14824
Author:   campbellbarton
Date:     2008-05-13 08:12:33 +0200 (Tue, 13 May 2008)

Log Message:
-----------
[#11152] [C] key shortcut is broken in UV/Image Editor
Only allow this inside paint mode.

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawimage.c
    trunk/blender/source/blender/src/header_image.c

Modified: trunk/blender/source/blender/src/drawimage.c
===================================================================
--- trunk/blender/source/blender/src/drawimage.c        2008-05-13 02:22:57 UTC 
(rev 14823)
+++ trunk/blender/source/blender/src/drawimage.c        2008-05-13 06:12:33 UTC 
(rev 14824)
@@ -1485,7 +1485,11 @@
        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

Modified: trunk/blender/source/blender/src/header_image.c
===================================================================
--- trunk/blender/source/blender/src/header_image.c     2008-05-13 02:22:57 UTC 
(rev 14823)
+++ trunk/blender/source/blender/src/header_image.c     2008-05-13 06:12:33 UTC 
(rev 14824)
@@ -476,7 +476,9 @@
        uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "View Properties...", 
0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Image 
Properties...|N",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Real-time 
Properties...",    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 13, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Paint Tool...|C",    
0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+       if (G.sima->image && (G.sima->flag & SI_DRAWTOOL)) {
+               uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Paint 
Tool...|C",    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+       }
        uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Curves Tool...",     
0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, "");
        uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Composite 
Preview...|Shift P",       0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, 
"");
        


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to