1.1 --- a/vymmodel.cpp Tue Apr 08 08:28:37 2008 +0000
1.2 +++ b/vymmodel.cpp Tue Apr 08 08:28:37 2008 +0000
1.3 @@ -81,7 +81,13 @@
1.4
1.5 MapCenterObj* VymModel::addMapCenter()
1.6 {
1.7 + return addMapCenter (QPointF(0,0));
1.8 +}
1.9 +
1.10 +MapCenterObj* VymModel::addMapCenter(QPointF absPos)
1.11 +{
1.12 MapCenterObj *mapCenter = new MapCenterObj(mapScene);
1.13 + mapCenter->move (absPos);
1.14 mapCenter->setVisibility (true);
1.15 mapCenter->setHeading (QApplication::translate("Heading of mapcenter in new map", "New map"));
1.16 mapCenter->setMapEditor(mapEditor); //FIXME needed to get defLinkStyle, mapLinkColorHint ... for later added objects
1.17 @@ -122,12 +128,11 @@
1.18 // Try to find MapCenter of bo
1.19 while (bo->getDepth()>0) bo=(BranchObj*)bo->getParObj();
1.20
1.21 -
1.22 // Try to find next MapCenter
1.23 int i=mapCenters.indexOf ((MapCenterObj*)bo);
1.24 - if (i+1 > mapCenters.count() || i<0) return NULL;
1.25 - if (mapCenters.at(i)!=bo_start)
1.26 - return mapCenters.at(i);
1.27 + if (i+2 > mapCenters.count() || i<0) return NULL;
1.28 + if (mapCenters.at(i+1)!=bo_start)
1.29 + return mapCenters.at(i+1);
1.30 }
1.31 return NULL;
1.32 }