QTfrontend/ui/widget/mapContainer.cpp
branchwebgl
changeset 8096 453917e94e55
parent 8070 66bc20d089fc
child 8092 08960209db8c
child 8377 869f80966a77
--- a/QTfrontend/ui/widget/mapContainer.cpp	Wed Nov 14 00:23:29 2012 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu Nov 22 00:41:53 2012 +0100
@@ -298,7 +298,7 @@
 
 void HWMapContainer::askForGeneratedPreview()
 {
-    pMap = new HWMap();
+    pMap = new HWMap(this);
     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 *)));
@@ -606,10 +606,7 @@
             break;
         default:
             QPixmap mapImage;
-            bool success = mapImage.load(
-                DataManager::instance().findFileForRead(
-                    "Maps/" + m_mapInfo.name + "/preview.png")
-            );
+            bool success = mapImage.load("physfs://Maps/" + m_mapInfo.name + "/preview.png");
 
             if(!success)
             {