changeset 351:39a616befdbd

Merge from branch "bug_90"
author Chris Cannam
date Wed, 16 Mar 2011 14:22:48 +0000
parents b422d1bcfb3c (current diff) 293d91cf44de (diff)
children 383223b1dd34
files
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/filestatuswidget.cpp	Wed Mar 16 12:18:50 2011 +0000
+++ b/filestatuswidget.cpp	Wed Mar 16 14:22:48 2011 +0000
@@ -251,8 +251,21 @@
 void FileStatusWidget::itemDoubleClicked(QListWidgetItem *item)
 {
     QStringList files;
-    files << item->text();
-    emit annotateFiles(files);
+    QString file = item->text();
+    files << file;
+
+    switch (m_fileStates.stateOf(file)) {
+
+    case FileStates::Modified:
+    case FileStates::InConflict:
+        emit diffFiles(files);
+        break;
+
+    case FileStates::Clean:
+    case FileStates::Missing:
+        emit annotateFiles(files);
+        break;
+    }
 }
 
 void FileStatusWidget::itemSelectionChanged()