Mercurial > hg > easyhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
151:c91445ee3d57 | 152:2b997861174b |
---|---|
1284 case ACT_LOG_INCREMENTAL: | 1284 case ACT_LOG_INCREMENTAL: |
1285 hgTabs->addIncrementalLog(output); | 1285 hgTabs->addIncrementalLog(output); |
1286 break; | 1286 break; |
1287 | 1287 |
1288 case ACT_QUERY_PARENTS: | 1288 case ACT_QUERY_PARENTS: |
1289 { | |
1289 foreach (Changeset *cs, currentParents) delete cs; | 1290 foreach (Changeset *cs, currentParents) delete cs; |
1290 currentParents = Changeset::parseChangesets(output); | 1291 currentParents = Changeset::parseChangesets(output); |
1292 QStringList parentIds = Changeset::getIds(currentParents); | |
1293 hgTabs->setCurrent(parentIds); | |
1294 } | |
1291 break; | 1295 break; |
1292 | 1296 |
1293 case ACT_QUERY_HEADS: | 1297 case ACT_QUERY_HEADS: |
1294 { | 1298 { |
1295 oldHeadIds = Changeset::getIds(currentHeads); | 1299 oldHeadIds = Changeset::getIds(currentHeads); |
1594 } | 1598 } |
1595 } | 1599 } |
1596 hgMergeAct->setEnabled(localRepoActionsEnabled && canMerge); | 1600 hgMergeAct->setEnabled(localRepoActionsEnabled && canMerge); |
1597 hgUpdateAct->setEnabled(localRepoActionsEnabled && canUpdate); | 1601 hgUpdateAct->setEnabled(localRepoActionsEnabled && canUpdate); |
1598 | 1602 |
1599 QStringList ids; | |
1600 foreach (Changeset *cs, currentParents) ids.push_back(cs->id()); | |
1601 hgTabs->setCurrent(ids, hgTabs->canCommit()); | |
1602 | |
1603 // Set the state field on the file status widget | 1603 // Set the state field on the file status widget |
1604 | 1604 |
1605 QString branchText; | 1605 QString branchText; |
1606 if (currentBranch == "" || currentBranch == "default") { | 1606 if (currentBranch == "" || currentBranch == "default") { |
1607 branchText = tr("the default branch"); | 1607 branchText = tr("the default branch"); |