2 // Copyright © 2009 The University of Chicago
3 #include "linguisticamainwindow.h"
5 #include "preferencesdialog.h"
6 #include "LPreferences.h"
9 void LinguisticaMainWindow::preferencesEditSlot()
11 PreferencesDialog
prefDlg(&m_preferences
,
12 m_lexicon
->GetDefaultParams(), this);
13 // Save preferences in case we cancel
14 CLPreferences::data_type saved_prefs
= m_preferences
.data();
16 if (prefDlg
.exec() == QDialog::Accepted
)
17 // User clicked 'OK', update settings
18 updateAllViewsSignal();
20 // User clicked 'Cancel', revert to old preferences
21 m_preferences
.data() = saved_prefs
;
23 m_preferences
.StorePrefs();