Fixed an issue in the ProjectBrowserModel and BrowserModel classes occuring on Windows systems.

Fri, 13 Apr 2012 19:16:01 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 13 Apr 2012 19:16:01 +0200
changeset 1785
9c6d23391248
parent 1782
90bd49fec9ff
child 1789
ebf61384cfdb
child 1795
07a359e15e6c

Fixed an issue in the ProjectBrowserModel and BrowserModel classes occuring on Windows systems.

Project/ProjectBrowserModel.py file | annotate | diff | comparison | revisions
UI/BrowserModel.py file | annotate | diff | comparison | revisions
--- a/Project/ProjectBrowserModel.py	Thu Apr 12 19:16:56 2012 +0200
+++ b/Project/ProjectBrowserModel.py	Fri Apr 13 19:16:01 2012 +0200
@@ -612,7 +612,7 @@
             # step 1: check for new entries
             children = itm.children()
             for f in entryInfoList:
-                fpath = f.absoluteFilePath()
+                fpath = Utilities.toNativeSeparators(f.absoluteFilePath())
                 childFound = False
                 for child in children:
                     if child.name() == fpath:
@@ -648,9 +648,10 @@
             if len(entryInfoList) != itm.childCount():
                 for row in range(oldCnt - 1, -1, -1):
                     child = itm.child(row)
+                    childname = Utilities.fromNativeSeparators(child.name())
                     entryFound = False
                     for f in entryInfoList:
-                        if f.absoluteFilePath() == child.name():
+                        if f.absoluteFilePath() == childname:
                             entryFound = True
                             entryInfoList.remove(f)
                             break
--- a/UI/BrowserModel.py	Thu Apr 12 19:16:56 2012 +0200
+++ b/UI/BrowserModel.py	Fri Apr 13 19:16:01 2012 +0200
@@ -299,7 +299,7 @@
             # step 1: check for new entries
             children = itm.children()
             for f in entryInfoList:
-                fpath = f.absoluteFilePath()
+                fpath = Utilities.toNativeSeparators(f.absoluteFilePath())
                 childFound = False
                 for child in children:
                     if child.name() == fpath:
@@ -326,9 +326,10 @@
             if len(entryInfoList) != itm.childCount():
                 for row in range(oldCnt - 1, -1, -1):
                     child = itm.child(row)
+                    childname = Utilities.fromNativeSeparators(child.name())
                     entryFound = False
                     for f in entryInfoList:
-                        if f.absoluteFilePath() == child.name():
+                        if f.absoluteFilePath() == childname:
                             entryFound = True
                             entryInfoList.remove(f)
                             break

eric ide

mercurial