From 0bd5e79bc7a99eb389cfc13b70e94f804c76f4b1 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 6 Jun 2013 10:09:28 +0300 Subject: [PATCH] Git: Disable cherry-pick and revert for commit message and int. rebase These editors are usually opened when a process is in progress, so it doesn't make sense to allow reverting or cherry-picking for them Change-Id: I6f238ef973be86d07d2646bcea969f9aa2742b9d Reviewed-by: Tobias Hunger --- src/plugins/git/giteditor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index 165b1e7998a..abd3bef64e7 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -284,8 +284,10 @@ bool GitEditor::isValidRevision(const QString &revision) const void GitEditor::addChangeActions(QMenu *menu, const QString &change) { m_currentChange = change; - menu->addAction(tr("Cherry-Pick Change %1").arg(change), this, SLOT(cherryPickChange())); - menu->addAction(tr("Revert Change %1").arg(change), this, SLOT(revertChange())); + if (contentType() != VcsBase::OtherContent) { + menu->addAction(tr("Cherry-Pick Change %1").arg(change), this, SLOT(cherryPickChange())); + menu->addAction(tr("Revert Change %1").arg(change), this, SLOT(revertChange())); + } } QString GitEditor::revisionSubject(const QTextBlock &inBlock) const