Patch #2903 2010-01-06 19:02

csun

Fix Bug #16593
Download
2903-Fix_Bug_16593.patch (1.2 KB)
Category
Plugin::Bugfix
Status
Accepted
Close date
2010-10-20 06:44
Assigned to
 
Index: src/plugins/classwizard/classwizard.cpp
===================================================================
--- src/plugins/classwizard/classwizard.cpp (revision 5276)
+++ src/plugins/classwizard/classwizard.cpp (working copy)
@@ -116,7 +116,7 @@
         {
             wxArrayInt targets;
             prjMan->AddFileToProject(dlg.GetHeaderFilename(), prj, targets);
-            if ((targets.GetCount() != 0) && (dlg.GetImplementationFilename() != _T("")) )
+            if ((targets.GetCount() != 0) && (dlg.IsImplementationValid()) )
                 prjMan->AddFileToProject(dlg.GetImplementationFilename(), prj, targets);
             prjMan->RebuildTree();
         }

Index: src/plugins/classwizard/classwizarddlg.h
===================================================================
--- src/plugins/classwizard/classwizarddlg.h
+++ src/plugins/classwizard/classwizarddlg.h
@@ -24,6 +24,7 @@
 
         // access
         const wxString& GetHeaderFilename()         const { return m_Header;         }
+        bool IsImplementationValid()                const { return m_GenerateImplementation && !m_Implementation.IsEmpty(); }
         const wxString& GetImplementationFilename() const { return m_Implementation; }
 
     private: