From fb93303cd4767322ed883a14c6ea898b593918dd Mon Sep 17 00:00:00 2001 From: James Crake-Merani Date: Fri, 23 Aug 2024 09:49:58 +0100 Subject: [PATCH] Set the parent of whatsnew correctly. Whatsnew's parent should be the mainwindow, not the gui manager. Also whatsnew is not passing on its parent to the QDialog super class. --- src/sas/qtgui/MainWindow/GuiManager.py | 4 ++-- src/sas/qtgui/Utilities/WhatsNew/WhatsNew.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sas/qtgui/MainWindow/GuiManager.py b/src/sas/qtgui/MainWindow/GuiManager.py index 6e445b56cd..fe3c14ca81 100644 --- a/src/sas/qtgui/MainWindow/GuiManager.py +++ b/src/sas/qtgui/MainWindow/GuiManager.py @@ -209,7 +209,7 @@ def addWidgets(self): self.GENSASCalculator = None self.DataOperation = DataOperationUtilityPanel(self) self.FileConverter = FileConverterWidget(self) - self.WhatsNew = WhatsNew(self) + self.WhatsNew = WhatsNew(self._parent) self.regenProgress = DocRegenProgress(self) def loadAllPerspectives(self): @@ -661,7 +661,7 @@ def actionWelcome(self): self.welcomePanel.show() def actionWhatsNew(self): - self.WhatsNew = WhatsNew(strictly_newer=False) + self.WhatsNew = WhatsNew(self._parent, strictly_newer=False) self.WhatsNew.show() def showWelcomeMessage(self): diff --git a/src/sas/qtgui/Utilities/WhatsNew/WhatsNew.py b/src/sas/qtgui/Utilities/WhatsNew/WhatsNew.py index a3c5ad1ce5..7c7be3da94 100644 --- a/src/sas/qtgui/Utilities/WhatsNew/WhatsNew.py +++ b/src/sas/qtgui/Utilities/WhatsNew/WhatsNew.py @@ -97,7 +97,7 @@ class WhatsNew(QDialog): """ def __init__(self, parent=None, strictly_newer=True): - super().__init__() + super().__init__(parent) self.setWindowTitle(f"What's New in SasView {sasview_version}")