src/eric7/EricWidgets/EricFileSaveConfirmDialog.py

branch
eric7
changeset 11035
e1e1d6e317c7
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
diff -r 7b8a21fd2d58 -r e1e1d6e317c7 src/eric7/EricWidgets/EricFileSaveConfirmDialog.py
--- 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
     )

eric ide

mercurial