Tue, 17 Jun 2014 19:48:58 +0200
Added code to the multi project 'Add Project' dialog to ensure, that the filename returned is absolute. If a relative one is entered it is concatenated with the path of the multi project file or the 'workspace', if it hasn't been saved yet.
MultiProject/AddProjectDialog.py | file | annotate | diff | comparison | revisions |
--- a/MultiProject/AddProjectDialog.py Mon Jun 16 18:35:31 2014 +0200 +++ b/MultiProject/AddProjectDialog.py Tue Jun 17 19:48:58 2014 +0200 @@ -7,6 +7,8 @@ Module implementing the add project dialog. """ +import os + from PyQt4.QtCore import pyqtSlot from PyQt4.QtGui import QDialog, QDialogButtonBox @@ -78,7 +80,12 @@ whether the project shall be the main project and a short description for the project """ - return (self.nameEdit.text(), self.filenameEdit.text(), + filename = Utilities.toNativeSeparators(self.filenameEdit.text()) + if not os.path.isabs(filename): + filename = Utilities.toNativeSeparators( + os.path.join(self.startdir, filename)) + + return (self.nameEdit.text(), filename, self.masterCheckBox.isChecked(), self.descriptionEdit.toPlainText())