diff -r e44baadd4958 -r 2cf3413b6ac9 mapeditor.cpp --- a/mapeditor.cpp Thu Sep 01 15:35:18 2005 +0000 +++ b/mapeditor.cpp Tue Sep 06 15:04:50 2005 +0000 @@ -115,6 +115,7 @@ extern QAction *actionFormatFrameRectangle; extern QActionGroup *actionGroupFormatLinkStyles; +extern QAction *actionFormatHideLinkUnselected; extern QAction *actionFormatLinkStyleLine; extern QAction *actionFormatLinkStyleParabel; extern QAction *actionFormatLinkStylePolyLine; @@ -154,6 +155,7 @@ setCanvas (mapCanvas); + // Always show scroll bars (automatic would flicker sometimes) setVScrollBarMode ( QScrollView::AlwaysOn ); setHScrollBarMode ( QScrollView::AlwaysOn ); @@ -2602,6 +2604,8 @@ default: break; } + actionFormatHideLinkUnselected->setOn + ( selection->getHideLinkUnselected()); } if ( (typeid(*selection) == typeid(FloatImageObj)) ) { @@ -2619,6 +2623,8 @@ actionEditDelete->setEnabled (true); actionEditToggleFloatExport->setOn ( ((FloatImageObj*)(selection))->getFloatExport() ); + actionFormatHideLinkUnselected->setOn + ( selection->getHideLinkUnselected()); } } else @@ -2640,6 +2646,16 @@ } } +void MapEditor::updateNoteFlag() +{ + if (selection) + { + if ( (typeid(*selection) == typeid(BranchObj)) || + (typeid(*selection) == typeid(MapCenterObj)) ) + ((BranchObj*)selection)->updateNoteFlag(); + } +} + void MapEditor::setLinkStyle (LinkStyle ls) { linkstyle=ls; @@ -2878,6 +2894,15 @@ } } +void MapEditor::setHideLinkUnselected (bool b) +{ + if (selection && + (typeid(*selection) == typeid(BranchObj)) || + (typeid(*selection) == typeid(MapCenterObj)) || + (typeid(*selection) == typeid(FloatImageObj)) ) + selection->setHideLinkUnselected(b); +} + void MapEditor::importDir(BranchObj *dst, QDir d) { if (selection && @@ -3211,7 +3236,7 @@ // Move the selected MapObj if ( selection && movingObj) { - ensureVisible (p.x(),p.y()); + ensureSelectionVisible (); // Now move the selection, but add relative position // (movingObj_start) where selection was chosen with