Fix raise window issue on Mac
This commit is contained in:
@@ -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> - %s</p>"
|
||||
"<p>Shutting down ...</p>"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user