]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxToggleButtonXmlHandler compilation with wxUniv.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jul 2010 22:50:09 +0000 (22:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jul 2010 22:50:09 +0000 (22:50 +0000)
Remove nonsensical code involving operator ?: with wxString and wxBitmap
operands. No idea what was the intention behind it but it failed to even
compile in wxX11 build so the new version (which does compile) can't be worse.

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

src/xrc/xh_tglbtn.cpp

index 1607b0f4efacfb7326fe97b89549c8a9434f60ed..be031f75659cfaa2e00eaddeeac7eb986dcc9be7 100644 (file)
@@ -71,15 +71,9 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control)
 {
     wxToggleButton *button = wxDynamicCast(control, wxToggleButton);
 
-    wxString label = GetText(wxT("label"));
-
     button->Create(m_parentAsWindow,
                    GetID(),
-#if defined(__WXUNIVERSAL__)
-                   !label.empty() ? label : GetBitmap(wxT("bitmap"), wxART_BUTTON),
-#else
-                   label,
-#endif
+                   GetText(wxT("label")),
                    GetPosition(), GetSize(),
                    GetStyle(),
                    wxDefaultValidator,