diff mainwindow.cpp @ 152:2b997861174b

* Set parents (setCurrent) on history widget when we know the new parents, not at each enable-disable actions call
author Chris Cannam
date Thu, 02 Dec 2010 11:51:15 +0000
parents c91445ee3d57
children 70fe12873106
line wrap: on
line diff
--- a/mainwindow.cpp	Thu Dec 02 11:33:09 2010 +0000
+++ b/mainwindow.cpp	Thu Dec 02 11:51:15 2010 +0000
@@ -1286,8 +1286,12 @@
         break;
         
     case ACT_QUERY_PARENTS:
+    {
         foreach (Changeset *cs, currentParents) delete cs;
         currentParents = Changeset::parseChangesets(output);
+        QStringList parentIds = Changeset::getIds(currentParents);
+        hgTabs->setCurrent(parentIds);
+    }
         break;
         
     case ACT_QUERY_HEADS:
@@ -1596,10 +1600,6 @@
     hgMergeAct->setEnabled(localRepoActionsEnabled && canMerge);
     hgUpdateAct->setEnabled(localRepoActionsEnabled && canUpdate);
 
-    QStringList ids;
-    foreach (Changeset *cs, currentParents) ids.push_back(cs->id());
-    hgTabs->setCurrent(ids, hgTabs->canCommit());
-
     // Set the state field on the file status widget
 
     QString branchText;