Patch #2841 2009-10-17 04:23

ir0nh34d

Fix bug 016338
Download
2841-Fix_bug_016338.patch (1.3 KB)
Category
Application::Bugfix
Status
Out of date
Close date
2010-02-03 17:41
Assigned to
mortenmacfly
Index: sdk/editormanager.cpp
===================================================================
--- sdk/editormanager.cpp       (revision 5865)
+++ sdk/editormanager.cpp       (working copy)
@@ -984,6 +984,7 @@
         if (opf)
         {
             wxString const &activeName = opf->file.GetName();
+            wxString const &activeDir = opf->file.GetPath(wxPATH_GET_VOLUME);

             // first try to find the file among the opened files
             for (int i = 0; i < GetEditorsCount(); ++i)
@@ -996,7 +997,7 @@
                 if (!pf)
                     continue;

-                if (pf->file.GetName() == activeName)
+                if ((pf->file.GetName() == activeName) && (pf->file.GetPath(wxPATH_GET_VOLUME) == activeDir))
                 {
                     wxFileName const & fname = pf->file;
                     FileType ft_other = FileTypeOf(fname.GetFullName());
@@ -1027,7 +1028,7 @@
                 if (dirs.Index(dir) == wxNOT_FOUND)
                     dirs.Add(dir);

-                if (pf->file.GetName() == activeName)
+                if ((pf->file.GetName() == activeName) && (pf->file.GetPath(wxPATH_GET_VOLUME) == activeDir))
                 {
                     wxFileName const & fname = pf->file;
                     FileType ft_other = FileTypeOf(fname.GetFullName());
mortenmacfly 2009-12-31 16:03

...seems to be outdated (superseded) by r5989. Please confirm so it can be closed. Thanks!

ir0nh34d 2009-12-31 23:24

I confirm that the patch applied in r5989 corrects the issue. Please close the issue, and thank you for taking care of this!