Mercurial > hg > easyhg
diff filestatuswidget.cpp @ 350:293d91cf44de bug_90
Double-click on modified files shows diff instead of annotation
author | Chris Cannam |
---|---|
date | Wed, 16 Mar 2011 12:26:03 +0000 |
parents | bb189827f6d1 |
children | 4cd753e083cc |
line wrap: on
line diff
--- a/filestatuswidget.cpp Wed Mar 16 12:18:50 2011 +0000 +++ b/filestatuswidget.cpp Wed Mar 16 12:26:03 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()