]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use images in wxToolBar with wxTB_NOICONS in wxOSX.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 01:32:03 +0000 (01:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 01:32:03 +0000 (01:32 +0000)
This results in asserts when adding items without bitmaps, but this should be
allowed when using wxTB_NOICONS.

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

src/osx/cocoa/toolbar.mm

index ed713512c8bc25a58e1ce1769e4f2cfa2e576979..f24970f53e88dd4288e29eec7b6c0adc1703d9fc 100644 (file)
@@ -1462,7 +1462,8 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
 
 #endif // wxOSX_USE_NATIVE_TOOLBAR
                 tool->SetControlHandle( controlHandle );
-                tool->UpdateImages();
+                if ( !(style & wxTB_NOICONS) )
+                    tool->UpdateImages();
                 tool->UpdateLabel();
 
                 if ( style & wxTB_NOICONS )