]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_sizer.cpp
Typos fixed and further clarification of the Python situation on Panther
[wxWidgets.git] / contrib / src / xrc / xh_sizer.cpp
index b1d0211177bf26c3fc844b4d8262641959a066df..3473ccd023887f21c19fc14c100dd99c0ce6b0e6 100644 (file)
@@ -175,7 +175,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
     wxXmlNode *parentNode = m_node->GetParent();
 
     wxCHECK_MSG(m_parentSizer != NULL ||
-                (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+                (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
                  m_parentAsWindow != NULL &&
                  (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
                   m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
@@ -206,7 +206,6 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
     // save state
     wxSizer *old_par = m_parentSizer;
     bool old_ins = m_isInside;
-    bool old_gbs = m_isGBS;
 
     // set new state
     m_parentSizer = sizer;
@@ -216,7 +215,6 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
     CreateChildren(m_parent, TRUE/*only this handler*/);
 
     // restore state
-    old_gbs = m_isGBS;    
     m_isInside = old_ins;
     m_parentSizer = old_par;
 
@@ -348,8 +346,8 @@ void wxSizerXmlHandler::SetSizerItemAttributes(wxSizerItem* sitem)
     if (m_isGBS)
     {
         wxGBSizerItem* gbsitem = (wxGBSizerItem*)sitem;
-        gbsitem->SetPos(GetGBPos(wxT("pos")));
-        gbsitem->SetSpan(GetGBSpan(wxT("span")));
+        gbsitem->SetPos(GetGBPos(wxT("cellpos")));
+        gbsitem->SetSpan(GetGBSpan(wxT("cellspan")));
     }    
 }