Minor fixes to dialogs, partially related to macOS

This commit is contained in:
Veronica K. B. Olsen
2020-10-07 18:38:43 +02:00
parent 357a407116
commit 87baabeaa5
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -915,6 +915,9 @@ class GuiBuildNovel(QDialog):
if theStatus: if theStatus:
self.textFont.setText(theFont.family()) self.textFont.setText(theFont.family())
self.textSize.setValue(theFont.pointSize()) self.textSize.setValue(theFont.pointSize())
self.raise_() # Move the dialog to front (fixes a bug on macOS)
return return
def _loadCache(self): def _loadCache(self):
+1 -1
View File
@@ -340,7 +340,7 @@ class GuiConfigEditGeneralTab(QWidget):
dlgOpt = QFileDialog.Options() dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.ShowDirsOnly dlgOpt |= QFileDialog.ShowDirsOnly
dlgOpt |= QFileDialog.DontUseNativeDialog dlgOpt |= QFileDialog.DontUseNativeDialog
newDir = QFileDialog.getExistingDirectory( newDir = QFileDialog.getExistingDirectory(
self, "Backup Directory", currDir, options=dlgOpt self, "Backup Directory", currDir, options=dlgOpt
) )
if newDir: if newDir:
+1 -1
View File
@@ -337,7 +337,7 @@ class GuiWritingStats(QDialog):
saveTo = QFileDialog.getSaveFileName( saveTo = QFileDialog.getSaveFileName(
self, "Save Document As", savePath, options=dlgOpt self, "Save Document As", savePath, options=dlgOpt
) )
if saveTo: if saveTo[0]:
savePath = saveTo[0] savePath = saveTo[0]
else: else:
return False return False