--- a/QTfrontend/ui/widget/mapContainer.cpp Thu May 03 01:18:29 2012 +0200
+++ b/QTfrontend/ui/widget/mapContainer.cpp Thu May 03 02:45:08 2012 +0200
@@ -297,6 +297,7 @@
pMap = new HWMap();
connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
+ connect(pMap, SIGNAL(destroyed(QObject *)), this, SLOT(onPreviewMapDestroyed(QObject *)));
pMap->getImage(m_seed,
getTemplateFilter(),
get_mapgen(),
@@ -602,3 +603,10 @@
}
}
+
+
+void HWMapContainer::onPreviewMapDestroyed(QObject * map)
+{
+ if (map == pMap)
+ pMap = 0;
+}
--- a/QTfrontend/ui/widget/mapContainer.h Thu May 03 01:18:29 2012 +0200
+++ b/QTfrontend/ui/widget/mapContainer.h Thu May 03 02:45:08 2012 +0200
@@ -73,6 +73,7 @@
void setDrawnMapData(const QByteArray & ar);
void setAllMapParameters(const QString & map, MapGenerator m, int mazesize, const QString & seed, int tmpl);
void updateModelViews();
+ void onPreviewMapDestroyed(QObject * map);
signals:
void seedChanged(const QString & seed);