pages[QString("%1$%2").arg(sp->category(), sp->title())] = sp;
sp->load();
// TESTING
- selectPage(sp->category(), sp->title());
+ // selectPage(sp->category(), sp->title());
}
void SettingsDlg::selectPage(const QString &cat, const QString &title) {
void SettingsDlg::buttonClicked(QAbstractButton *button) {
switch(ui.buttonBox->standardButton(button)) {
case QDialogButtonBox::Ok:
- if(applyChanges()) accept();
+ if(currentPage() && currentPage()->hasChanged()) {
+ if(applyChanges()) accept();
+ } else accept();
break;
case QDialogButtonBox::Apply:
applyChanges();