1.1 --- a/mapcenterobj.cpp Mon Jan 07 14:52:51 2008 +0000
1.2 +++ b/mapcenterobj.cpp Mon Jan 14 16:26:59 2008 +0000
1.3 @@ -1,7 +1,8 @@
1.4 #include <QDateTime>
1.5
1.6 +#include "floatimageobj.h"
1.7 +#include "geometry.h"
1.8 #include "mapcenterobj.h"
1.9 -#include "floatimageobj.h"
1.10
1.11 /////////////////////////////////////////////////////////////////
1.12 // MapCenterObj
1.13 @@ -106,11 +107,11 @@
1.14 if (lmo!= NULL) return lmo;
1.15 }
1.16 // is p in MapCenter?
1.17 - if (inBox (p) && (this != excludeLMO) ) return this;
1.18 + if (inBox (p,clickBox) && (this != excludeLMO) ) return this;
1.19
1.20 // Search float images
1.21 for (int i=0; i<floatimage.size(); ++i)
1.22 - if (floatimage.at(i)->inBox(p) && (floatimage.at(i) != excludeLMO) && floatimage.at(i)->getParObj()!= excludeLMO) return floatimage.at(i);
1.23 + if (inBox(p,floatimage.at(i)->getClickBox()) && (floatimage.at(i) != excludeLMO) && floatimage.at(i)->getParObj()!= excludeLMO) return floatimage.at(i);
1.24
1.25 // nothing found
1.26 return NULL;
2.1 --- a/selection.cpp Mon Jan 07 14:52:51 2008 +0000
2.2 +++ b/selection.cpp Mon Jan 14 16:26:59 2008 +0000
2.3 @@ -4,6 +4,7 @@
2.4
2.5 #include "mainwindow.h"
2.6 #include "mapeditor.h"
2.7 +#include "vymmodel.h"
2.8
2.9
2.10
2.11 @@ -18,16 +19,14 @@
2.12 {
2.13 }
2.14
2.15 -void Selection::setMapEditor (MapEditor *me)
2.16 +void Selection::setModel (VymModel *m)
2.17 {
2.18 - mapEditor=me;
2.19 - mapCenter=me->getMapCenter();
2.20 - scene=mapCenter->getScene();
2.21 + model=m;
2.22 + scene=model->getScene();
2.23 }
2.24
2.25 void Selection::copy(const Selection &other)
2.26 {
2.27 - mapCenter=other.mapCenter;
2.28 selectList=other.selectList;
2.29 lastSelectList=other.lastSelectList;
2.30 }
2.31 @@ -77,13 +76,13 @@
2.32 selboxList.append (sb);
2.33 lmo->select();
2.34 update();
2.35 - mainWindow->updateSatellites (mapEditor); // update branchPropWindow...
2.36 + mainWindow->updateSatellites (model->getMapEditor() ); // update branchPropWindow...
2.37 return true;
2.38 }
2.39
2.40 bool Selection::select (const QString &s) // TODO no multiselections yet
2.41 {
2.42 - LinkableMapObj *lmo=mapCenter->findObjBySelect(s);
2.43 + LinkableMapObj *lmo=model->findObjBySelect(s);
2.44
2.45 // Finally select the found object
2.46 if (lmo)