diff -r f39230b845e4 -r fcb5126077b1 ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py --- a/ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py Sat Dec 23 17:08:59 2023 +0100 +++ b/ProjectFlask/FlaskMigrateExtension/MigrateProjectExtension.py Mon Oct 28 17:11:28 2024 +0100 @@ -40,13 +40,14 @@ @type ProjectFlaskPlugin @param project reference to the project object @type Project - @param parent parent - @type QObject + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.__plugin = plugin self.__project = project + self.__ui = parent self.__ericProject = ericApp().getObject("Project") @@ -384,7 +385,7 @@ from .MigrateConfigDialog import MigrateConfigDialog config = self.__project.getData("flask-migrate", "") - dlg = MigrateConfigDialog(config) + dlg = MigrateConfigDialog(config, parent=self.__ui) if dlg.exec() == QDialog.DialogCode.Accepted: config = dlg.getConfiguration() self.__project.setData("flask-migrate", "", config) @@ -463,6 +464,7 @@ self.__project, title=title, msgSuccess=self.tr("\nMigrations initialized successfully."), + parent=self.__ui, ) if dlg.startCommand("db", args): dlg.exec() @@ -513,6 +515,7 @@ self.__project, title=title, msgSuccess=self.tr("\nMigration created successfully."), + parent=self.__ui, ) if dlg.startCommand("db", args): dlg.exec() @@ -550,6 +553,7 @@ self.__project, title=title, msgSuccess=self.tr("\nDatabase upgraded successfully."), + parent=self.__ui, ) if dlg.startCommand("db", args): dlg.exec() @@ -577,6 +581,7 @@ self.__project, title=title, msgSuccess=self.tr("\nDatabase downgraded successfully."), + parent=self.__ui, ) if dlg.startCommand("db", args): dlg.exec() @@ -616,6 +621,6 @@ if migrations: args += ["--directory", migrations] - dlg = FlaskCommandDialog(self.__project, title=title) + dlg = FlaskCommandDialog(self.__project, title=title, parent=self.__ui) if dlg.startCommand("db", args): dlg.exec()