diff -r 31c6ce8efbc7 -r 6783e13bb05d mainwindow.cpp --- a/mainwindow.cpp Thu Mar 24 21:10:38 2005 +0000 +++ b/mainwindow.cpp Sat Apr 09 22:50:08 2005 +0000 @@ -92,7 +92,6 @@ extern QAction *actionEditSelectLast; extern QAction *actionEditLoadImage; extern QAction *actionEditToggleFloatExport; -extern QAction *actionEditNoLink; extern QAction* actionFormatColor; extern QAction* actionFormatPickColor; @@ -128,6 +127,7 @@ extern QPopupMenu* branchContextMenu; extern QPopupMenu* branchLinksContextMenu; +extern QPopupMenu* branchLinksContextMenuDup; extern QPopupMenu* floatimageContextMenu; extern QPopupMenu* saveImageFormatMenu; extern QPopupMenu* canvasContextMenu; @@ -572,10 +572,6 @@ connect( a, SIGNAL( activated() ), this, SLOT( editLoadImage() ) ); actionEditLoadImage=a; - // inserted into branchLinksContextMenu, if no link is available. - a = new QAction( tr( "No link available" ),tr( "No link available" ), 0, this, "noLink" ); - a->setEnabled (false); - actionEditNoLink=a; } // Format Actions @@ -856,8 +852,12 @@ // This will be populated "on demand" in MapEditor::updateActions branchContextMenu->insertSeparator(); branchLinksContextMenu =new QPopupMenu (this); - branchContextMenu->insertItem ("Goto Link",branchLinksContextMenu); + branchContextMenu->insertItem (tr("Goto Link"),branchLinksContextMenu); connect( branchLinksContextMenu, SIGNAL( activated(int) ), this, SLOT( editFollowLink(int ) ) ); + + branchLinksContextMenuDup =new QPopupMenu (this); + branchContextMenu->insertItem (tr("Edit Link"),branchLinksContextMenuDup); + connect( branchLinksContextMenuDup, SIGNAL( activated(int) ), this, SLOT( editEditLink(int ) ) ); // Context menu for floatimage floatimageContextMenu =new QPopupMenu (this); @@ -1537,8 +1537,9 @@ fileSave(savemode); // Set name of tab - tabWidget->setTabLabel (currentMapEditor(), - currentMapEditor()->getFileName() ); + if (savemode==CompleteMap) + tabWidget->setTabLabel (currentMapEditor(), + currentMapEditor()->getFileName() ); return; } } @@ -1999,6 +2000,12 @@ currentMapEditor()->followLink(branchLinksContextMenu->indexOf(item)); } +void Main::editEditLink(int item) +{ + if (currentMapEditor()) + currentMapEditor()->editLink(branchLinksContextMenuDup->indexOf(item)); +} + void Main::formatSelectColor() { if (currentMapEditor())