Patch #1016 2006-04-27 17:31

sethjackson

bool cbEditor::SaveAs()
Download
1016-bool_cbEditor.patch (1.1 KB)
Category
Application::Refinement
Status
Accepted
Close date
2006-04-27 17:42
Assigned to
 
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp    (revision 2388)
+++ src/sdk/cbeditor.cpp    (working copy)
@@ -882,12 +882,12 @@
 {
     wxFileName fname;
     fname.Assign(m_Filename);
-    wxFileDialog* dlg = new wxFileDialog(this,
-                            _("Save file"),
-                            fname.GetPath(),
-                            fname.GetFullName(),
-                            FileFilters::GetFilterString(),
-                            wxSAVE | wxOVERWRITE_PROMPT);
+    wxFileDialog* dlg = new wxFileDialog(Manager::Get()->GetAppWindow(),
+                                         _("Save file"),
+                                         fname.GetPath(),
+                                         fname.GetFullName(),
+                                         FileFilters::GetFilterString(),
+                                         wxSAVE | wxOVERWRITE_PROMPT);
 
     PlaceWindow(dlg);
     if (dlg->ShowModal() != wxID_OK)
@@ -901,6 +901,9 @@
     m_IsOK = true;
     SetModified(true);
     SetLanguage( HL_AUTO );
+
+    dlg->Destroy();
+
     return Save();
 }
 
sethjackson 2006-04-27 17:31