1.1 --- a/linkablemapobj.cpp Mon Sep 07 15:36:57 2009 +0000
1.2 +++ b/linkablemapobj.cpp Wed Nov 25 15:28:05 2009 +0000
1.3 @@ -39,6 +39,7 @@
1.4
1.5 void LinkableMapObj::delLink()
1.6 {
1.7 + //bottomline->hide();
1.8 switch (style)
1.9 {
1.10 case Line:
1.11 @@ -62,6 +63,7 @@
1.12 {
1.13 parObj=NULL;
1.14 parObjTmpBuf=NULL;
1.15 + tmpParent=false;
1.16 parPos=QPointF(0,0);
1.17 childPos=QPointF(0,0);
1.18 link2ParPos=false;
1.19 @@ -78,6 +80,8 @@
1.20 pen.setWidth (1);
1.21 pen.setColor (linkcolor);
1.22 pen.setCapStyle ( Qt::RoundCap );
1.23 +
1.24 + useBottomline=true;
1.25 bottomline=scene->addLine(QLineF(1,1,1,1),pen);
1.26 bottomline->setZValue(Z_LINK);
1.27 bottomline->show();
1.28 @@ -116,8 +120,7 @@
1.29
1.30 bool LinkableMapObj::hasParObjTmp()
1.31 {
1.32 - if (parObjTmpBuf) return true;
1.33 - return false;
1.34 + return tmpParent;
1.35 }
1.36
1.37 void LinkableMapObj::setUseRelPos (const bool &b)
1.38 @@ -205,7 +208,6 @@
1.39
1.40 void LinkableMapObj::setLinkStyle(Style newstyle)
1.41 {
1.42 - //if (newstyle==style) return; FIXME-3
1.43 delLink();
1.44
1.45 style=newstyle;
1.46 @@ -368,7 +370,11 @@
1.47
1.48 if (visnow)
1.49 {
1.50 - bottomline->show();
1.51 + if (useBottomline)
1.52 + bottomline->show();
1.53 + else
1.54 + bottomline->hide();
1.55 +
1.56 switch (style)
1.57 {
1.58 case Line:
1.59 @@ -477,7 +483,6 @@
1.60 double vy=p2y - p1y;
1.61
1.62 // Draw the horizontal line below heading (from ChildPos to ParPos)
1.63 - //bottomline->prepareGeometryChange();
1.64 bottomline->setLine (QLine (qRound(childPos.x()),
1.65 qRound(childPos.y()),
1.66 qRound(p1x),