Fix raise window issue on Mac

This commit is contained in:
Veronica Berglyd Olsen
2023-07-30 19:55:47 +02:00
parent b93bc0a295
commit 25f9f0519f
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ def main(sysArgs=None):
errDlg = QErrorMessage()
errDlg.resize(500, 300)
errDlg.showMessage((
"<h3>A critical error has been encountered</h3>"
"<h3>A critical error was encountered</h3>"
"<p>novelWriter cannot start due to the following issues:<p>"
"<p>&nbsp;-&nbsp;%s</p>"
"<p>Shutting down ...</p>"
-3
View File
@@ -301,9 +301,6 @@ class GuiMain(QMainWindow):
# Forward Functions
self.setStatus = self.mainStatus.setStatus
# Force a show of the GUI
self.show()
# Check that config loaded fine
self.reportConfErr()
+6
View File
@@ -75,6 +75,7 @@ class GuiBuildSettings(QDialog):
logger.debug("Create: GuiBuildSettings")
self.setObjectName("GuiBuildSettings")
self.guiParent = parent
self.mainGui = mainGui
self.mainTheme = mainGui.mainTheme
self.theProject = mainGui.theProject
@@ -208,8 +209,10 @@ class GuiBuildSettings(QDialog):
elif role == QDialogButtonBox.AcceptRole:
self._emitBuildData()
self.close()
self.guiParent.raise_() # Issue #1494
elif role == QDialogButtonBox.RejectRole:
self.close()
self.guiParent.raise_() # Issue #1494
return
##
@@ -941,6 +944,7 @@ class _FormatTab(QWidget):
def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings):
super().__init__(parent=buildMain)
self.buildMain = buildMain
self.mainGui = buildMain.mainGui
self.mainTheme = buildMain.mainGui.mainTheme
@@ -1160,6 +1164,8 @@ class _FormatTab(QWidget):
if theStatus:
self.textFont.setText(theFont.family())
self.textSize.setValue(theFont.pointSize())
self.buildMain.guiParent.raise_() # Issue #1494
self.buildMain.raise_() # Issue #1494
return
@pyqtSlot(int)