diff options
Diffstat (limited to 'sigmodr/SigmodrUI.cpp')
-rw-r--r-- | sigmodr/SigmodrUI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sigmodr/SigmodrUI.cpp b/sigmodr/SigmodrUI.cpp index c58654cd..6ea019d3 100644 --- a/sigmodr/SigmodrUI.cpp +++ b/sigmodr/SigmodrUI.cpp @@ -450,7 +450,7 @@ void Sigmodr::SigmodrUI::on_treeSigmod_clicked(const QModelIndex& index) { if (formPanel->widget() && boxButtons->isEnabled()) { - switch (KMessageBox::questionYesNoCancel(this, "You have unsaved changes, would you like to save them?", QString("Unsaved %1").arg(qobject_cast<ObjectUI*>(formPanel->widget())->original()->className()))) + switch (KMessageBox::questionYesNoCancel(this, "You have unsaved changes, would you like to save them?", QString("Unsaved %1").arg(qobject_cast<ObjectUI*>(formPanel->widget())->object()->className()))) { case KMessageBox::Yes: qobject_cast<ObjectUI*>(formPanel->widget())->apply(); @@ -464,8 +464,8 @@ void Sigmodr::SigmodrUI::on_treeSigmod_clicked(const QModelIndex& index) } boxButtons->setEnabled(false); connect(widget, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool))); + connect(widget, SIGNAL(saved()), this, SLOT(setDirty())); connect(buttonApply, SIGNAL(clicked()), widget, SLOT(apply())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(setDirty())); connect(buttonReset, SIGNAL(clicked()), widget, SLOT(discard())); setChangedTitle(treeSigmod->dirty(treeSigmod->currentGame())); formPanel->setWidget(widget); |