]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/utils/wxrcedit/editor.cpp
fixed 'patch' #422993 (Error in wxConfigBase::Write for doubles)
[wxWidgets.git] / contrib / utils / wxrcedit / editor.cpp
index 04b5cfde657d693dd85dea7d34c2c99fec48f41e..bb2e401403305ee17ce103e0582172565322b3c6 100644 (file)
@@ -254,8 +254,14 @@ void EditorFrame::LoadFile(const wxString& filename)
 void EditorFrame::SaveFile(const wxString& filename)
 {
     m_FileName = filename;
-
-    if (!m_Resource->Save(filename, wxXML_IO_LIBXML))
+    
+    // change version:
+    wxXmlNode *root = m_Resource->GetRoot();
+    root->DeleteProperty(wxT("version"));
+    root->AddProperty(wxT("version"), wxT(WX_XMLRES_CURRENT_VERSION_STRING));
+    
+    // save it:
+    if (!m_Resource->Save(filename))
         wxLogError(_("Error saving ") + filename);
     else
         m_Modified = FALSE;