--- a/QTfrontend/ui/widget/mapContainer.cpp Sun Nov 09 15:52:09 2014 -0500
+++ b/QTfrontend/ui/widget/mapContainer.cpp Sun Nov 09 16:38:26 2014 -0500
@@ -232,7 +232,7 @@
mapFeatureSize->setValue(m_mapFeatureSize);
mapFeatureSize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bottomLeftLayout->addWidget(mapFeatureSize, 0);
- connect(mapFeatureSize, SIGNAL(valueChanged(int)), this, SLOT(mapFeatureSizeChanged(int)));
+ connect(mapFeatureSize, SIGNAL(valueChanged(int)), this, SLOT(setFeatureSize(int)));
/* Mission description */
@@ -693,7 +693,7 @@
}
}
-void HWMapContainer::setAllMapParameters(const QString &map, MapGenerator m, int mazesize, const QString &seed, int tmpl)
+void HWMapContainer::setAllMapParameters(const QString &map, MapGenerator m, int mazesize, const QString &seed, int tmpl, int featureSize)
{
intSetMapgen(m);
intSetMazeSize(mazesize);
@@ -701,6 +701,8 @@
intSetTemplateFilter(tmpl);
// this one last because it will refresh the preview
intSetMap(map);
+ intSetMazeSize(mazesize);
+ intSetFeatureSize(featureSize);
}
void HWMapContainer::updateModelViews()
@@ -774,6 +776,7 @@
mapgen = MAPGEN_DRAWN;
setMapInfo(MapModel::MapInfoDrawn);
btnLoadMap->show();
+ mapFeatureSize->hide();
btnEditMap->show();
break;
case MapModel::MissionMap:
@@ -783,7 +786,7 @@
lblMapList->setText(tr("Mission:"));
lblMapList->show();
missionMapList->show();
- mapFeatureSize->hide();
+ mapFeatureSize->hide();
lblDesc->setText(m_mapInfo.desc);
lblDesc->show();
emit mapChanged(m_curMap);
@@ -794,6 +797,7 @@
staticMapChanged(newMap.isValid() ? newMap : staticMapList->currentIndex());
lblMapList->setText(tr("Map:"));
lblMapList->show();
+ mapFeatureSize->hide();
staticMapList->show();
emit mapChanged(m_curMap);
break;
@@ -819,10 +823,15 @@
emit mapgenChanged(mapgen);
}
-void HWMapContainer::mapFeatureSizeChanged(int val)
+void HWMapContainer::intSetFeatureSize(int val)
+{
+ mapFeatureSize->setValue(val);
+ emit mapFeatureSizeChanged(val);
+}
+void HWMapContainer::setFeatureSize(int val)
{
m_mapFeatureSize = val;
- // needs to be per map type, scales will be different
+ intSetFeatureSize(val);
//m_mapFeatureSize = val>>2<<2;
//if (qAbs(m_prevMapFeatureSize-m_mapFeatureSize) > 4)
{
@@ -834,7 +843,7 @@
// unused because I needed the space for the slider
void HWMapContainer::updateThemeButtonSize()
{
- if (m_mapInfo.type != MapModel::StaticMap)
+ if (m_mapInfo.type != MapModel::StaticMap && m_mapInfo.type != MapModel::HandDrawnMap)
{
btnTheme->setIconSize(QSize(30, 30));
btnTheme->setFixedHeight(30);