From 01bc533fa75737f84805ce8553395649eef556f4 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 5 May 2016 19:27:11 +0200 Subject: Keep the current directory in filepicker and in prefs dialog box for destination --- mageiaSync/mageiasync.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index 3582e2a..617c37e 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -379,9 +379,10 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): def selectDestination(self): # dialog box to select the destination (local directory) - directory = QFileDialog.getExistingDirectory(self, self.tr('Select a directory'),'~/') - isosSync.destination = directory - self.pd.selectDest.setText(isosSync.destination) + directory = QFileDialog.getExistingDirectory(self, self.tr('Select a directory'),self.destination) + if directory != "": + isosSync.destination = directory + self.pd.selectDest.setText(isosSync.destination) def selectAllIsos(self): @@ -463,7 +464,8 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): self.password) if code==0: for item in list: - self.pd.release.addItem(item) self.pd.password.setText(self.password) + self.pd.release.addItem(item) + self.pd.password.setText(self.password) self.pd.user.setText(self.user) self.pd.location.setText(self.location) self.pd.selectDest.setText(self.destination) -- cgit v1.2.1