]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_toolb.cpp
Call Realize() later in XRC toolbar handler (patch #13888).
[wxWidgets.git] / src / xrc / xh_toolb.cpp
index c6e75a361554b42b62197ee08c4ecbc28cf2ecda..2d262ee9024beb2189c4e8a3f1f684f74dfb468b 100644 (file)
@@ -239,8 +239,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
         m_isInside = false;
         m_toolbar = NULL;
 
         m_isInside = false;
         m_toolbar = NULL;
 
-        toolbar->Realize();
-
         if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
         {
             wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
         if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
         {
             wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
@@ -248,6 +246,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
                 parentFrame->SetToolBar(toolbar);
         }
 
                 parentFrame->SetToolBar(toolbar);
         }
 
+        toolbar->Realize();
+
         return toolbar;
     }
 }
         return toolbar;
     }
 }