diff src/changesetitem.cpp @ 514:306a62fe851e

Add "Close branch" menu option. Is currently available in some cases where it should not be, and using it exposes the fact that the chain of marked-closed changesets is not yet right in grapher.
author Chris Cannam
date Tue, 18 Oct 2011 16:50:05 +0100
parents c623ce6b3104
children 000f13faa089
line wrap: on
line diff
--- a/src/changesetitem.cpp	Tue Oct 18 12:49:39 2011 +0100
+++ b/src/changesetitem.cpp	Tue Oct 18 16:50:05 2011 +0100
@@ -197,6 +197,10 @@
     branch->setEnabled(m_current);
     connect(branch, SIGNAL(triggered()), this, SLOT(newBranchActivated()));
 
+    QAction *closebranch = menu->addAction(tr("Close branch..."));
+    closebranch->setEnabled(m_current);
+    connect(closebranch, SIGNAL(triggered()), this, SLOT(closeBranchActivated()));
+
     QAction *tag = menu->addAction(tr("Add tag..."));
     connect(tag, SIGNAL(triggered()), this, SLOT(tagActivated()));
 
@@ -240,6 +244,7 @@
 void ChangesetItem::mergeActivated() { emit mergeFrom(getId()); }
 void ChangesetItem::tagActivated() { emit tag(getId()); }
 void ChangesetItem::newBranchActivated() { emit newBranch(getId()); }
+void ChangesetItem::closeBranchActivated() { emit closeBranch(getId()); }
 
 void
 ChangesetItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *)