From 1055a9b2d0a4e065812a048a3fe3390b550f3262 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 1 Mar 2009 15:42:17 -0500 Subject: Update Sigmodr to use new signals --- sigmodr/SigmodrUI.cpp | 4 ++-- 1 file 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(formPanel->widget())->original()->className()))) + switch (KMessageBox::questionYesNoCancel(this, "You have unsaved changes, would you like to save them?", QString("Unsaved %1").arg(qobject_cast(formPanel->widget())->object()->className()))) { case KMessageBox::Yes: qobject_cast(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); -- cgit