Fix raise window issue on Mac
This commit is contained in:
@@ -189,7 +189,7 @@ def main(sysArgs=None):
|
|||||||
errDlg = QErrorMessage()
|
errDlg = QErrorMessage()
|
||||||
errDlg.resize(500, 300)
|
errDlg.resize(500, 300)
|
||||||
errDlg.showMessage((
|
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>novelWriter cannot start due to the following issues:<p>"
|
||||||
"<p> - %s</p>"
|
"<p> - %s</p>"
|
||||||
"<p>Shutting down ...</p>"
|
"<p>Shutting down ...</p>"
|
||||||
|
|||||||
@@ -301,9 +301,6 @@ class GuiMain(QMainWindow):
|
|||||||
# Forward Functions
|
# Forward Functions
|
||||||
self.setStatus = self.mainStatus.setStatus
|
self.setStatus = self.mainStatus.setStatus
|
||||||
|
|
||||||
# Force a show of the GUI
|
|
||||||
self.show()
|
|
||||||
|
|
||||||
# Check that config loaded fine
|
# Check that config loaded fine
|
||||||
self.reportConfErr()
|
self.reportConfErr()
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ class GuiBuildSettings(QDialog):
|
|||||||
logger.debug("Create: GuiBuildSettings")
|
logger.debug("Create: GuiBuildSettings")
|
||||||
self.setObjectName("GuiBuildSettings")
|
self.setObjectName("GuiBuildSettings")
|
||||||
|
|
||||||
|
self.guiParent = parent
|
||||||
self.mainGui = mainGui
|
self.mainGui = mainGui
|
||||||
self.mainTheme = mainGui.mainTheme
|
self.mainTheme = mainGui.mainTheme
|
||||||
self.theProject = mainGui.theProject
|
self.theProject = mainGui.theProject
|
||||||
@@ -208,8 +209,10 @@ class GuiBuildSettings(QDialog):
|
|||||||
elif role == QDialogButtonBox.AcceptRole:
|
elif role == QDialogButtonBox.AcceptRole:
|
||||||
self._emitBuildData()
|
self._emitBuildData()
|
||||||
self.close()
|
self.close()
|
||||||
|
self.guiParent.raise_() # Issue #1494
|
||||||
elif role == QDialogButtonBox.RejectRole:
|
elif role == QDialogButtonBox.RejectRole:
|
||||||
self.close()
|
self.close()
|
||||||
|
self.guiParent.raise_() # Issue #1494
|
||||||
return
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -941,6 +944,7 @@ class _FormatTab(QWidget):
|
|||||||
def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings):
|
def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings):
|
||||||
super().__init__(parent=buildMain)
|
super().__init__(parent=buildMain)
|
||||||
|
|
||||||
|
self.buildMain = buildMain
|
||||||
self.mainGui = buildMain.mainGui
|
self.mainGui = buildMain.mainGui
|
||||||
self.mainTheme = buildMain.mainGui.mainTheme
|
self.mainTheme = buildMain.mainGui.mainTheme
|
||||||
|
|
||||||
@@ -1160,6 +1164,8 @@ class _FormatTab(QWidget):
|
|||||||
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.buildMain.guiParent.raise_() # Issue #1494
|
||||||
|
self.buildMain.raise_() # Issue #1494
|
||||||
return
|
return
|
||||||
|
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
|
|||||||
Reference in New Issue
Block a user