Fixed an issue adding a new form or a new resource file.

Mon, 16 May 2011 19:48:55 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 16 May 2011 19:48:55 +0200
changeset 1040
9e25732c452a
parent 1039
dc91f24e307d
child 1042
f6efc93ff22a

Fixed an issue adding a new form or a new resource file.

Project/ProjectFormsBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectResourcesBrowser.py file | annotate | diff | comparison | revisions
--- a/Project/ProjectFormsBrowser.py	Sun May 15 19:20:41 2011 +0200
+++ b/Project/ProjectFormsBrowser.py	Mon May 16 19:48:55 2011 +0200
@@ -462,7 +462,10 @@
             try:
                 path = os.path.dirname(itm.fileName())
             except AttributeError:
-                path = os.path.join(self.project.ppath, itm.data(0))
+                try:
+                    path = itm.dirName()
+                except AttributeError:
+                    path = os.path.join(self.project.ppath, itm.data(0))
         
         if self.hooks["newForm"] is not None:
             self.hooks["newForm"](path)
--- a/Project/ProjectResourcesBrowser.py	Sun May 15 19:20:41 2011 +0200
+++ b/Project/ProjectResourcesBrowser.py	Mon May 16 19:48:55 2011 +0200
@@ -380,7 +380,10 @@
             try:
                 path = os.path.dirname(itm.fileName())
             except AttributeError:
-                path = os.path.join(self.project.ppath, itm.data(0))
+                try:
+                    path = itm.dirName()
+                except AttributeError:
+                    path = os.path.join(self.project.ppath, itm.data(0))
         
         if self.hooks["newResource"] is not None:
             self.hooks["newResource"](path)

eric ide

mercurial