1.1 --- a/linkablemapobj.cpp Tue Oct 24 15:36:38 2006 +0000
1.2 +++ b/linkablemapobj.cpp Mon Oct 30 12:39:37 2006 +0000
1.3 @@ -154,9 +154,13 @@
1.4 {
1.5 if (parObj)
1.6 {
1.7 - getRelPos();
1.8 + relPos.setX (absPos.x() - parObj->getChildPos().x() );
1.9 + relPos.setY (absPos.y() - parObj->getChildPos().y() );
1.10 parObj->calcBBoxSize();
1.11 - }
1.12 + } else
1.13 + {
1.14 + qWarning ("LMO::setRelPos No parent yet!");
1.15 + }
1.16 }
1.17
1.18 void LinkableMapObj::setRelPos(const QPoint &p)
1.19 @@ -166,14 +170,15 @@
1.20 {
1.21 parObj->calcBBoxSize();
1.22 requestReposition();
1.23 - }
1.24 + } else
1.25 + {
1.26 + qWarning ("LMO::setRelPos No parent yet!");
1.27 + }
1.28 }
1.29
1.30 QPoint LinkableMapObj::getRelPos()
1.31 {
1.32 if (!parObj) return QPoint();
1.33 - relPos.setX (absPos.x() - parObj->getChildPos().x() );
1.34 - relPos.setY (absPos.y() - parObj->getChildPos().y() );
1.35 return relPos;
1.36 }
1.37
1.38 @@ -713,9 +718,9 @@
1.39
1.40 void LinkableMapObj::reposition()
1.41 {
1.42 + cout << "LMO::reposition\n";
1.43 // FIXME not needed? Is overloaded in BranchObj...
1.44 /*
1.45 - cout << "LMO::reposition\n";
1.46 if (depth==0)
1.47 {
1.48 // only calculate the sizes once. If the deepest LMO changes its height,