diff src/grapher.cpp @ 516:2981d2defa61

Introduce a graphical representation for merge from a closed to an open branch (half a connection item)
author Chris Cannam
date Thu, 20 Oct 2011 12:04:47 +0100
parents fc35aa6d433e
children fb196c016a9f
line wrap: on
line diff
--- a/src/grapher.cpp	Thu Oct 20 11:36:49 2011 +0100
+++ b/src/grapher.cpp	Thu Oct 20 12:04:47 2011 +0100
@@ -515,12 +515,16 @@
         ChangesetItem *item = m_items[id];
         bool merge = (cs->parents().size() > 1);
         foreach (QString parentId, cs->parents()) {
-            if (!m_items.contains(parentId)) continue;
+            if (!m_changesets.contains(parentId)) continue;
             ConnectionItem *conn = new ConnectionItem();
             if (merge) conn->setConnectionType(ConnectionItem::Merge);
             conn->setChild(item);
-            conn->setParent(m_items[parentId]);
             conn->setZValue(-1);
+            if (m_items.contains(parentId)) {
+                conn->setParent(m_items[parentId]);
+            } else {
+                conn->setMergedBranch(m_changesets[parentId]->branch());
+            }
             m_scene->addItem(conn);
         }
     }