mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-23 16:04:13 +02:00
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:
+4
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user