summaryrefslogtreecommitdiffstats
path: root/sigscript/WeatherWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigscript/WeatherWrapper.cpp')
-rw-r--r--sigscript/WeatherWrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sigscript/WeatherWrapper.cpp b/sigscript/WeatherWrapper.cpp
index 3473572c..58bc2910 100644
--- a/sigscript/WeatherWrapper.cpp
+++ b/sigscript/WeatherWrapper.cpp
@@ -23,9 +23,10 @@
Sigscript::WeatherWrapper* Sigscript::WeatherWrapper::create(const Sigmod::Weather* weather, SigmodWrapper* parent)
{
- if (!m_instances.contains(Signature(parent, weather->id())))
- m_instances[Signature(parent, weather->id())] = new WeatherWrapper(weather, parent);
- return qobject_cast<WeatherWrapper*>(m_instances[Signature(parent, weather->id())]);
+ Signature sig = Signature(parent, Subsignature(weather->className(), weather->id()));
+ if (!m_instances.contains(sig))
+ m_instances[sig] = new WeatherWrapper(weather, parent);
+ return qobject_cast<WeatherWrapper*>(m_instances[sig]);
}
Sigscript::WeatherWrapper::WeatherWrapper(const Sigmod::Weather* weather, SigmodWrapper* parent) :