From: duplo Date: Tue, 13 Jan 2009 09:02:53 +0000 (+0000) Subject: If an empty string is returned by the filedialog it does nothing X-Git-Tag: 2.1.0~515 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=5869df5617befd9ae3812e60bc50bb531b2d6e42;p=bertos.git If an empty string is returned by the filedialog it does nothing git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2167 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 76f99172..f92b4577 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -51,8 +51,9 @@ class BFolderPage(BWizardPage): self.emit(SIGNAL("completeChanged()")) def _selectDirectory(self): - directory = QFileDialog.getExistingDirectory(self, self.tr("Open Directory"), "", QFileDialog.ShowDirsOnly) - self.pageContent.directoryEdit.setText(directory) + directory = unicode(QFileDialog.getExistingDirectory(self, self.tr("Open Directory"), "", QFileDialog.ShowDirsOnly)) + if len(directory) == "": + self.pageContent.directoryEdit.setText(directory) def isComplete(self): if self.pageContent.projectPath.text() != "None":