changeset 173:a6d336837ebe

* Add (examining repository) message for initial state * Reduce panner glitches when dragging * Clear merge commit comment after use
author Chris Cannam
date Thu, 16 Dec 2010 12:03:09 +0000
parents b6dd1ee0e486
children 4dc802a4d5ae
files mainwindow.cpp mainwindow.h panner.cpp
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mainwindow.cpp	Wed Dec 15 22:07:31 2010 +0000
+++ b/mainwindow.cpp	Thu Dec 16 12:03:09 2010 +0000
@@ -322,6 +322,7 @@
         }
         
         runner->requestAction(HgAction(ACT_COMMIT, workFolderPath, params));
+        mergeCommitComment = "";
     }
 }
 
@@ -769,6 +770,7 @@
     lastRevertedFiles.clear();
     mergeTargetRevision = "";
     mergeCommitComment = "";
+    stateUnknown = true;
     needNewLog = true;
 }
 
@@ -1544,6 +1546,7 @@
     }
 
     if (noMore) {
+        stateUnknown = false;
         enableDisableActions();
         hgTabs->updateHistory();
     }
@@ -1727,7 +1730,9 @@
         branchText = tr("branch \"%1\"").arg(currentBranch);
     }
 
-    if (emptyRepo) {
+    if (stateUnknown) {
+        hgTabs->setState(tr("(Examining repository)"));
+    } else if (emptyRepo) {
         hgTabs->setState(tr("Nothing committed to this repository yet"));
     } else if (canMerge) {
         hgTabs->setState(tr("<b>Awaiting merge</b> on %1").arg(branchText));
--- a/mainwindow.h	Wed Dec 15 22:07:31 2010 +0000
+++ b/mainwindow.h	Thu Dec 16 12:03:09 2010 +0000
@@ -50,6 +50,7 @@
     Changesets currentHeads;
     Changesets currentParents;
     int commitsSincePush;
+    bool stateUnknown;
     bool needNewLog;
 
 protected:
--- a/panner.cpp	Wed Dec 15 22:07:31 2010 +0000
+++ b/panner.cpp	Thu Dec 16 12:03:09 2010 +0000
@@ -227,7 +227,7 @@
     QPointF delta = mp - cp;
     QRectF nr = m_clickedRect;
     nr.translate(delta);
-    slotSetPannedRect(nr);
+    m_pannedRect = nr;
     emit pannedRectChanged(m_pannedRect);
     viewport()->update();
 }