From 5869df5617befd9ae3812e60bc50bb531b2d6e42 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 13 Jan 2009 09:02:53 +0000 Subject: [PATCH] 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 --- wizard/BFolderPage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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": -- 2.25.1