--- a/src/eric7/EricWidgets/EricFileSaveConfirmDialog.py Sun Nov 03 17:50:34 2024 +0100 +++ b/src/eric7/EricWidgets/EricFileSaveConfirmDialog.py Sun Nov 03 18:12:28 2024 +0100 @@ -9,6 +9,7 @@ import os +from PyQt6.QtCore import QCoreApplication from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QLineEdit, QVBoxLayout from .EricPathPicker import EricPathPicker, EricPathPickerModes @@ -144,6 +145,9 @@ overwrite) and the filename (in case of 'rename' or 'overwrite') @rtype tuple of (str, str) """ + if parent is None: + parent = QCoreApplication.instance().getMainWindow() + dlg = EricFileSaveConfirmDialog( filename, title, message=message, picker=picker, parent=parent )