From e4630543dc17d2a42c27d192518fe3f54e7888bc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 27 Aug 2008 17:21:45 +0000 Subject: [FIX] Added KNewStuff2 for Pokémod upload and download [FIX] ValidationDialog can be used piecemeal now [ADD] Added KNewStuff configuration file [FIX] pokemodr-devel now includes the UI forms for use as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@247 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemodr/ObjectUI.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pokemodr/ObjectUI.cpp') diff --git a/pokemodr/ObjectUI.cpp b/pokemodr/ObjectUI.cpp index 0cc5609b..834a31f5 100644 --- a/pokemodr/ObjectUI.cpp +++ b/pokemodr/ObjectUI.cpp @@ -34,6 +34,7 @@ Pokemodr::ObjectUI::ObjectUI(QWidget* parent) : QWidget(parent), m_changed(false), + m_validator(NULL), m_object(NULL), m_object_mod(NULL) { @@ -121,13 +122,17 @@ void Pokemodr::ObjectUI::contextMenu(const QPoint& pos) void Pokemodr::ObjectUI::validate() { - new ValidationDialog(m_object, this); + apply(); + m_validator->show(); } void Pokemodr::ObjectUI::setObjects(Pokemod::Object* original, Pokemod::Object* modified) { m_object = original; m_object_mod = modified; + if (m_validator) + delete m_validator; + m_validator = new ValidationDialog(m_object, this); connect(m_object_mod, SIGNAL(changed()), this, SIGNAL(changed())); connect(m_object_mod, SIGNAL(changed()), this, SLOT(setGui())); connect(m_object_mod, SIGNAL(error(QString)), this, SLOT(setGui())); -- cgit