]> git.saurik.com Git - wxWidgets.git/commitdiff
Prevent wxMac from creating an epmpty bitmap in a toolbar
authorRobert Roebling <robert@roebling.de>
Sun, 31 Aug 2003 12:05:49 +0000 (12:05 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 31 Aug 2003 12:05:49 +0000 (12:05 +0000)
    if all we want is a separator.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toolbar.cpp
src/mac/toolbar.cpp

index 51ba976d420f25e714509e9fd2680f0f0b18c353..d8bdac1326f60f9cf121423a9a3a12299b82ebf1 100644 (file)
@@ -173,7 +173,9 @@ wxToolBarTool::wxToolBarTool(wxToolBar *tbar,
         : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
                             clientData, shortHelp, longHelp)
 {
-    Init() ;
+    Init();
+    
+    if (id == wxID_SEPARATOR) return;
     
     WindowRef window = (WindowRef) tbar->MacGetRootWindow() ;    
     wxSize toolSize = tbar->GetToolSize() ;    
index 51ba976d420f25e714509e9fd2680f0f0b18c353..d8bdac1326f60f9cf121423a9a3a12299b82ebf1 100644 (file)
@@ -173,7 +173,9 @@ wxToolBarTool::wxToolBarTool(wxToolBar *tbar,
         : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
                             clientData, shortHelp, longHelp)
 {
-    Init() ;
+    Init();
+    
+    if (id == wxID_SEPARATOR) return;
     
     WindowRef window = (WindowRef) tbar->MacGetRootWindow() ;    
     wxSize toolSize = tbar->GetToolSize() ;