QScintilla/Editor.py

branch
5_1_x
changeset 995
cd875a519a3a
parent 987
156472e165f4
child 1113
95d837803666
--- 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