]> git.saurik.com Git - wxWidgets.git/commitdiff
removed loading from in-memory document (illicit idea)
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 29 Sep 2000 19:58:31 +0000 (19:58 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 29 Sep 2000 19:58:31 +0000 (19:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/include/wx/xml/xmlres.h
contrib/src/xml/xmlres.cpp

index 006c166a20e5a83d072b957eca49ef834c41b92b..fd012efd0ee4e201a0035ea42a2778850d731f3f 100644 (file)
@@ -45,7 +45,6 @@ class WXDLLEXPORT wxXmlResourceDataRecord
     
         wxString File;
         wxXmlDocument *Doc;
-        bool DocOwned;
         wxDateTime Time;
 };
 
@@ -110,7 +109,7 @@ class WXDLLEXPORT wxXmlResource : public wxObject
         wxPanel *LoadPanel(wxWindow *parent, const wxString& name);
         bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name);
 
-        // Load bitmap or icon resource from file:
+        // Loads bitmap or icon resource from file:
         wxBitmap LoadBitmap(const wxString& name);
         wxIcon LoadIcon(const wxString& name);
 
index b34261062949f75d950ee3fb1140204d35a21c71..ee8299df4b6290bf5df23d6d92dfcfb51a967be2 100644 (file)
@@ -54,12 +54,6 @@ wxXmlResource::wxXmlResource(const wxString& filemask, bool use_locale = TRUE)
 
 wxXmlResource::~wxXmlResource()
 {
-    for (size_t i = 0; i < m_Data.GetCount(); i++)
-    {
-        if (!m_Data[i].DocOwned) m_Data[i].Doc = NULL;
-        // we don't want it to be deleted
-    }
-    
     ClearHandlers();
 }
 
@@ -97,7 +91,6 @@ bool wxXmlResource::Load(const wxString& filemask)
                 drec = new wxXmlResourceDataRecord;
                 drec->File = fnd2;
                 m_Data.Add(drec);
-                drec->DocOwned = TRUE;
                 fnd2 = fs2.FindNext();
             }
         }
@@ -106,7 +99,6 @@ bool wxXmlResource::Load(const wxString& filemask)
         {
             drec = new wxXmlResourceDataRecord;
             drec->File = fnd;
-            drec->DocOwned = TRUE;
             m_Data.Add(drec);
         }
 
@@ -268,8 +260,6 @@ void wxXmlResource::UpdateResources()
 
     for (size_t i = 0; i < m_Data.GetCount(); i++)
     {
-        if (!m_Data[i].DocOwned) continue;
-    
         modif = (m_Data[i].Doc == NULL);
 
         if (!modif)