1.1 --- a/mapeditor.cpp Tue Feb 08 14:07:19 2005 +0000
1.2 +++ b/mapeditor.cpp Sat Feb 19 17:14:33 2005 +0000
1.3 @@ -2673,11 +2673,9 @@
1.4
1.5 void MapEditor::followLink(int i)
1.6 {
1.7 - cout << "ME::followLink "<<i<<endl;
1.8 BranchObj *bo=((BranchObj*)(selection))->linkTargetAt(i);
1.9 if (bo)
1.10 {
1.11 - cout << "follow to "<<bo->getHeading()<<endl;
1.12 selection->unselect();
1.13 selection=bo;
1.14 selection->select();
1.15 @@ -2688,7 +2686,6 @@
1.16 void MapEditor::testFunction()
1.17 {
1.18 cout << "MapEditor::testFunction() called\n";
1.19 - branchLinksContextMenu->setEnabled (false);
1.20 }
1.21
1.22 void MapEditor::ensureSelectionVisible()
1.23 @@ -2778,14 +2775,20 @@
1.24 }
1.25 if (actionModModeLink->isOn())
1.26 {
1.27 - if (selection &&
1.28 - ((typeid(*selection) == typeid(BranchObj)) ||
1.29 - (typeid(*selection) == typeid(MapCenterObj))) )
1.30 + BranchObj *bo_begin=NULL;
1.31 + if (lmo)
1.32 + bo_begin=(BranchObj*)(lmo);
1.33 + else
1.34 + if (selection &&
1.35 + ((typeid(*selection) == typeid(BranchObj)) ||
1.36 + (typeid(*selection) == typeid(MapCenterObj))) )
1.37 + bo_begin=(BranchObj*)(selection);
1.38 + if (bo_begin)
1.39 {
1.40 drawingLink=true;
1.41 - linkingObj_src=selection;
1.42 + linkingObj_src=bo_begin;
1.43 tmpLink=new LinkObj (mapCanvas);
1.44 - tmpLink->setBegin ( ((BranchObj*)(selection)) );
1.45 + tmpLink->setBegin (bo_begin);
1.46 tmpLink->setEnd (p);
1.47 tmpLink->updateLink();
1.48 tmpLink->setVisibility (true);
1.49 @@ -3040,6 +3043,7 @@
1.50 tmpLink->setEnd ( ((BranchObj*)(dst)) );
1.51 tmpLink->updateLink();
1.52 tmpLink->activate();
1.53 + setChanged();
1.54
1.55 } else
1.56 {