diff -r e3f722759c7e -r 340bc29da9a0 linkablemapobj.cpp --- a/linkablemapobj.cpp Wed May 20 15:40:14 2009 +0000 +++ b/linkablemapobj.cpp Tue May 26 11:23:44 2009 +0000 @@ -57,9 +57,6 @@ void LinkableMapObj::init () { - model=NULL; - - childObj=NULL; parObj=NULL; parObjTmpBuf=NULL; parPos=QPointF(0,0); @@ -103,7 +100,6 @@ void LinkableMapObj::copy (LinkableMapObj* other) { MapObj::copy(other); - model=other->model; bboxTotal=other->bboxTotal; setLinkStyle(other->style); setLinkColor (other->linkcolor); @@ -122,25 +118,9 @@ return treeItem; } -void LinkableMapObj::setModel (VymModel *vm) -{ - model=vm; -} - -VymModel* LinkableMapObj::getModel() -{ - return model; -} - -void LinkableMapObj::setChildObj(LinkableMapObj* o) -{ - childObj=o; -} - void LinkableMapObj::setParObj(LinkableMapObj* o) { parObj=o; - if (parObj) model=parObj->getModel(); } void LinkableMapObj::setParObjTmp(LinkableMapObj*,QPointF,int) // FIXME-3 make pure virtual @@ -205,6 +185,7 @@ LinkableMapObj::Style LinkableMapObj::getDefLinkStyle () { + VymModel *model=treeItem->getModel(); if (!model) { qWarning ("LMO::getDefLinkStyle model=NULL"); @@ -246,7 +227,7 @@ style=newstyle; - if (childObj!=NULL && parObj != NULL) + if (parObj != NULL) { QGraphicsLineItem *cl; switch (style) @@ -332,6 +313,7 @@ { // Overloaded in BranchObj and children // here only set default color + VymModel *model=treeItem->getModel(); if (model) setLinkColor (model->getMapDefLinkColor()); } @@ -554,11 +536,6 @@ } // switch (style) } -LinkableMapObj* LinkableMapObj::getChildObj() -{ - return childObj; -} - LinkableMapObj* LinkableMapObj::getParObj() { return parObj; @@ -621,6 +598,7 @@ // we want to block expensive repositioning, but just do it once at // the end, thus check first: + VymModel *model=treeItem->getModel(); if (model->isRepositionBlocked()) return; // Pass on the request to parent objects, if this hasn't been done yet