Tue, 17 Jun 2014 19:46:24 +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:46:24 2014 +0200 @@ -9,6 +9,8 @@ from __future__ import unicode_literals +import os + from PyQt4.QtCore import pyqtSlot from PyQt4.QtGui import QDialog, QDialogButtonBox @@ -98,8 +100,12 @@ from PyQt4.QtCore import QUuid self.uid = QUuid.createUuid().toString() + 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(), - self.filenameEdit.text(), + filename, self.masterCheckBox.isChecked(), self.descriptionEdit.toPlainText(), self.categoryComboBox.currentText(),