summaryrefslogtreecommitdiffstats
path: root/sigscript/EggGroupWrapper.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-10-16 23:36:56 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-10-16 23:36:56 +0000
commit3b83cc89885788de19b09f5e9e55c5d3ad7c60c9 (patch)
tree5de86af20055a96c81952fb44a0e0193681b9762 /sigscript/EggGroupWrapper.cpp
parent460e7bdf3f6c1de69f41b02a16deb85522ae3c49 (diff)
downloadsigen-3b83cc89885788de19b09f5e9e55c5d3ad7c60c9.tar.gz
sigen-3b83cc89885788de19b09f5e9e55c5d3ad7c60c9.tar.xz
sigen-3b83cc89885788de19b09f5e9e55c5d3ad7c60c9.zip
[FIX] Signature is fixed in Sigscript
[FIX] Hat cleaned up a bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@279 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript/EggGroupWrapper.cpp')
-rw-r--r--sigscript/EggGroupWrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sigscript/EggGroupWrapper.cpp b/sigscript/EggGroupWrapper.cpp
index fee20d84..0c18289b 100644
--- a/sigscript/EggGroupWrapper.cpp
+++ b/sigscript/EggGroupWrapper.cpp
@@ -23,9 +23,10 @@
Sigscript::EggGroupWrapper* Sigscript::EggGroupWrapper::create(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent)
{
- if (!m_instances.contains(Signature(parent, eggGroup->id())))
- m_instances[Signature(parent, eggGroup->id())] = new EggGroupWrapper(eggGroup, parent);
- return qobject_cast<EggGroupWrapper*>(m_instances[Signature(parent, eggGroup->id())]);
+ Signature sig = Signature(parent, Subsignature(eggGroup->className(), eggGroup->id()));
+ if (!m_instances.contains(sig))
+ m_instances[sig] = new EggGroupWrapper(eggGroup, parent);
+ return qobject_cast<EggGroupWrapper*>(m_instances[sig]);
}
Sigscript::EggGroupWrapper::EggGroupWrapper(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent) :