If an empty string is returned by the filedialog it does nothing
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 13 Jan 2009 09:02:53 +0000 (09:02 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 13 Jan 2009 09:02:53 +0000 (09:02 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2167 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BFolderPage.py

index 76f99172bed5dfa76f95ed6076f5124c0bf4f60a..f92b457743b4c47290ef9103a4836e6d3641fb5c 100644 (file)
@@ -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":