From 77124f3f105ea3837022d20a49028309a211c4b0 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 15 May 2008 17:03:09 +0000 Subject: [FIX] Refactored the apply/discard buttons out of the widgets git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@137 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemodr/MapUI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pokemodr/MapUI.cpp') diff --git a/pokemodr/MapUI.cpp b/pokemodr/MapUI.cpp index 75436eee..749b2bf5 100644 --- a/pokemodr/MapUI.cpp +++ b/pokemodr/MapUI.cpp @@ -41,7 +41,6 @@ MapUI::MapUI(Map* map, QWidget* parent) : QMetaObject::connectSlotsByName(this); setObjects(map, new Map(*map)); m_model = new TilemapModel(this, static_cast(modified())->map(), static_cast(original()->pokemod())); - connect(this, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool))); connect(modified(), SIGNAL(error(const QString&)), this, SLOT(setGui())); connect(modified(), SIGNAL(error(const QString&)), this, SLOT(errorMessage(const QString&))); connect(modified(), SIGNAL(warning(const QString&)), this, SLOT(warningMessage(const QString&))); @@ -87,13 +86,13 @@ void MapUI::setGui() buttonDeleteRow->setEnabled(0 < m_model->rowCount()); } -void MapUI::on_buttonApply_clicked() +void MapUI::apply() { *static_cast(original()) = *static_cast(modified()); emit(changed(false)); } -void MapUI::on_buttonDiscard_clicked() +void MapUI::discard() { *static_cast(modified()) = *static_cast(original()); setGui(); -- cgit