diff -r d85834ad8c54 -r 133e2ed6b9c5 mainwindow.cpp --- a/mainwindow.cpp Mon Aug 24 14:39:07 2009 +0000 +++ b/mainwindow.cpp Thu Sep 03 08:52:00 2009 +0000 @@ -21,6 +21,7 @@ #include "settings.h" #include "texteditor.h" #include "warningdialog.h" +#include "xlinkitem.h" #if defined(Q_OS_WIN32) // Define only this structure as opposed to @@ -3382,26 +3383,21 @@ actionFormatHideLinkUnselected->setEnabled (true); } - if (selbi) // FIXME-4 many properties of former BranchObj are in TreeItem meanwhile... + if (selbi) { - // Take care of links // updateActions: FIXME-1 - /* - if (bo->countXLinks()==0) + // Take care of xlinks + branchXLinksContextMenuEdit->clear(); + branchXLinksContextMenuFollow->clear(); + if (selbi->xlinkCount()>0) { - branchXLinksContextMenuEdit->clear(); - branchXLinksContextMenuFollow->clear(); - } else - { - BranchObj *bot; + BranchItem *bi; QString s; - branchXLinksContextMenuEdit->clear(); - branchXLinksContextMenuFollow->clear(); - for (int i=0; i<=bo->countXLinks();i++) + for (int i=0; ixlinkCount();++i) { - bot=bo->XLinkTargetAt(i); - if (bot) + bi=selbi->getXLinkNum(i)->getPartnerBranch(); + if (bi) { - s=bot->getHeading(); + s=bi->getHeading(); if (s.length()>xLinkMenuWidth) s=s.left(xLinkMenuWidth)+"..."; branchXLinksContextMenuFollow->addAction (s); @@ -3409,7 +3405,6 @@ } } } - */ //Standard Flags standardFlagsMaster->updateToolBar (selbi->activeStandardFlagNames() );