Fix #527 follow-up: use ApplicationModal for app config dialog (configureQET)

Same root cause as ProjectPropertiesDialog: Qt::WindowModal only blocks the
direct parent window, leaving the rest of the MDI area live.  If new_project
or close_project fires while the app settings dialog is open, any raw pointers
derived from the project list become stale.  Switch to ApplicationModal to
block all windows for the duration of the dialog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Shane Ringrose
2026-06-22 17:48:19 +12:00
parent 5cc2e165bf
commit bab32b3764
+4 -1
View File
@@ -1969,7 +1969,10 @@ void QETApp::configureQET()
// cree le dialogue
ConfigDialog cd;
cd.setWindowTitle(tr("Configurer QElectroTech", "window title"));
cd.setWindowModality(Qt::WindowModal);
// ApplicationModal so no other window can dispatch events while the dialog
// holds raw pointers derived from the current project list. Same class of
// bug as ProjectPropertiesDialog — see issue #527.
cd.setWindowModality(Qt::ApplicationModal);
cd.addPage(new GeneralConfigurationPage());
cd.addPage(new NewDiagramPage());
cd.addPage(new ExportConfigPage());