diff src/confirmcommentdialog.cpp @ 505:1c05e7576ea5

Fix bug #292: "Merge that results in no changes leaves interface in inconsistent state." Show uncommitted state whenever a merge is present, even if no file changes
author Chris Cannam
date Mon, 17 Oct 2011 16:25:02 +0100
parents 50920723dd16
children 533519ebc0cb
line wrap: on
line diff
--- a/src/confirmcommentdialog.cpp	Thu Sep 15 14:51:39 2011 +0100
+++ b/src/confirmcommentdialog.cpp	Mon Oct 17 16:25:02 2011 +0100
@@ -91,10 +91,15 @@
     else text = "<qt>" + intro + "<p>";
 
     text += "<code>";
-    foreach (QString file, files) {
-        text += "&nbsp;&nbsp;&nbsp;" + xmlEncode(file) + "<br>";
+    if (files.empty()) {
+        text += "&nbsp;&nbsp;&nbsp;</code>";
+        text += tr("(no files: metadata only)");
+    } else {
+        foreach (QString file, files) {
+            text += "&nbsp;&nbsp;&nbsp;" + xmlEncode(file) + "<br>";
+        }
+        text += "</code></qt>";
     }
-    text += "</code></qt>";
 
     return text;
 }