adding Kevin's fix for wxTOOL_STYLE_SEPARATOR
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 11 Sep 2009 21:01:45 +0000 (21:01 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 11 Sep 2009 21:01:45 +0000 (21:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/toolbar.mm

index 3d24514ef0b25430a38770d56c64dfd8e9532b48..e7e62c6da75c6f62cf713e6c98c595ef8ee47094 100644 (file)
@@ -960,10 +960,16 @@ bool wxToolBar::Realize()
                             }
                         }
                     }
-                    wxString identifier = wxString::Format( wxT("%ld"), (long) tool );
-                    wxCFStringRef cfidentifier(identifier);
+                    if (tool->GetStyle() == wxTOOL_STYLE_SEPARATOR)
+                        [refTB insertItemWithItemIdentifier:NSToolbarSeparatorItemIdentifier atIndex:currentPosition];
+                    else
+                    {
+                            
+                        wxString identifier = wxString::Format( wxT("%ld"), (long) tool );
+                        wxCFStringRef cfidentifier(identifier);
 
-                    [refTB insertItemWithItemIdentifier:cfidentifier.AsNSString() atIndex:currentPosition];
+                        [refTB insertItemWithItemIdentifier:cfidentifier.AsNSString() atIndex:currentPosition];
+                    }
                     tool->SetIndex( currentPosition );
                 }