1.1 --- a/selection.cpp Mon Jan 07 14:52:51 2008 +0000
1.2 +++ b/selection.cpp Mon Jan 14 16:26:59 2008 +0000
1.3 @@ -4,6 +4,7 @@
1.4
1.5 #include "mainwindow.h"
1.6 #include "mapeditor.h"
1.7 +#include "vymmodel.h"
1.8
1.9
1.10
1.11 @@ -18,16 +19,14 @@
1.12 {
1.13 }
1.14
1.15 -void Selection::setMapEditor (MapEditor *me)
1.16 +void Selection::setModel (VymModel *m)
1.17 {
1.18 - mapEditor=me;
1.19 - mapCenter=me->getMapCenter();
1.20 - scene=mapCenter->getScene();
1.21 + model=m;
1.22 + scene=model->getScene();
1.23 }
1.24
1.25 void Selection::copy(const Selection &other)
1.26 {
1.27 - mapCenter=other.mapCenter;
1.28 selectList=other.selectList;
1.29 lastSelectList=other.lastSelectList;
1.30 }
1.31 @@ -77,13 +76,13 @@
1.32 selboxList.append (sb);
1.33 lmo->select();
1.34 update();
1.35 - mainWindow->updateSatellites (mapEditor); // update branchPropWindow...
1.36 + mainWindow->updateSatellites (model->getMapEditor() ); // update branchPropWindow...
1.37 return true;
1.38 }
1.39
1.40 bool Selection::select (const QString &s) // TODO no multiselections yet
1.41 {
1.42 - LinkableMapObj *lmo=mapCenter->findObjBySelect(s);
1.43 + LinkableMapObj *lmo=model->findObjBySelect(s);
1.44
1.45 // Finally select the found object
1.46 if (lmo)