Refined the save as function when a project is open. 5_1_x

Thu, 21 Apr 2011 09:08:06 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 21 Apr 2011 09:08:06 +0200
branch
5_1_x
changeset 995
cd875a519a3a
parent 987
156472e165f4
child 997
270d271a9ef3

Refined the save as function when a project is open.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Fri Apr 15 19:51:35 2011 +0200
+++ b/QScintilla/Editor.py	Thu Apr 21 09:08:06 2011 +0200
@@ -2457,7 +2457,11 @@
             
             # save to project, if a project is loaded
             if self.project.isOpen():
-                path = self.project.getProjectPath()
+                if self.fileName is not None and \
+                   self.project.startswithProjectPath(self.fileName):
+                    path = os.path.dirname(self.fileName)
+                else:
+                    path = self.project.getProjectPath()
             
             if not path and self.fileName is not None:
                 path = os.path.dirname(self.fileName)

eric ide

mercurial