QTfrontend/ui/widget/mapContainer.cpp
changeset 7008 25563f054ef3
parent 6983 ede55af89e78
child 7014 c0b32404ef74
equal deleted inserted replaced
7005:19cddb42326f 7008:25563f054ef3
   295     }
   295     }
   296 
   296 
   297     pMap = new HWMap();
   297     pMap = new HWMap();
   298     connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
   298     connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
   299     connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
   299     connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
       
   300     connect(pMap, SIGNAL(destroyed(QObject *)), this, SLOT(onPreviewMapDestroyed(QObject *)));
   300     pMap->getImage(m_seed,
   301     pMap->getImage(m_seed,
   301                    getTemplateFilter(),
   302                    getTemplateFilter(),
   302                    get_mapgen(),
   303                    get_mapgen(),
   303                    getMazeSize(),
   304                    getMazeSize(),
   304                    getDrawnMapData()
   305                    getDrawnMapData()
   600         else
   601         else
   601             chooseMap->setCurrentIndex(0);
   602             chooseMap->setCurrentIndex(0);
   602     }
   603     }
   603 
   604 
   604 }
   605 }
       
   606 
       
   607 
       
   608 void HWMapContainer::onPreviewMapDestroyed(QObject * map)
       
   609 {
       
   610     if (map == pMap)
       
   611         pMap = 0;
       
   612 }