diff hgexpwidget.cpp @ 53:3c46b2ac45d3

* Put proper labels &c in changeset items; colour branches and users; etc
author Chris Cannam
date Fri, 12 Nov 2010 16:48:18 +0000
parents 384420567575
children f583e44d9d31
line wrap: on
line diff
--- a/hgexpwidget.cpp	Fri Nov 12 11:32:01 2010 +0000
+++ b/hgexpwidget.cpp	Fri Nov 12 16:48:18 2010 +0000
@@ -261,8 +261,9 @@
     QGraphicsScene *scene = new QGraphicsScene();
     Changesets csets = parseChangeSets(hgLogList);
     if (csets.empty()) return;
+    Grapher g(scene);
     try {
-	Grapher(scene).layout(csets);
+	g.layout(csets);
     } catch (std::string s) {
 	std::cerr << "Internal error: Layout failed: " << s << std::endl;
     }
@@ -270,6 +271,8 @@
     panned->setScene(scene);
     panner->scene()->deleteLater();
     panner->setScene(scene);
+    ChangesetItem *tipItem = g.getItemFor(csets[0]);
+    if (tipItem) tipItem->ensureVisible();
 }