From 8ee769a3bc5b15226e09a78537ad4548cfe7a5e7 Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@nokia.com>
Date: Mon, 9 Nov 2009 16:03:32 +0100
Subject: [PATCH] Disabling "Undo Project Changes" when not working in a Git
 repository.

Reviewed-by: Friedemann Kleint
---
 src/plugins/git/gitplugin.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 8ce1b1938d3..6e442bec7f2 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -759,6 +759,7 @@ void GitPlugin::updateActions()
         m_statusProjectAction->setEnabled(false);
         m_logProjectAction->setParameter(repository);
         m_logProjectAction->setEnabled(false);
+        m_undoProjectAction->setEnabled(false);
         return;
     }
 
@@ -778,6 +779,7 @@ void GitPlugin::updateActions()
     m_statusProjectAction->setParameter(project);
     m_logProjectAction->setEnabled(enabled);
     m_logProjectAction->setParameter(project);
+    m_undoProjectAction->setEnabled(enabled);
 }
 
 void GitPlugin::showCommit()
-- 
GitLab