From 30ca854b3ad67bf0f13cdfa4d07dcb53f2f87dee Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Thu, 2 Dec 2010 13:04:59 +0100
Subject: [PATCH] Git: Use proper name for patches from codepasters

Task-number: QTCREATORBUG-3207
---
 src/plugins/vcsbase/vcsbaseplugin.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index 9d7b2b5310d..ddd49ddd9ba 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -127,6 +127,7 @@ bool State::equals(const State &rhs) const
     return currentFile == rhs.currentFile
             && currentFileName == rhs.currentFileName
             && currentPatchFile == rhs.currentPatchFile
+            && currentPatchFileDisplayName == rhs.currentPatchFileDisplayName
             && currentFileTopLevel == rhs.currentFileTopLevel
             && currentProjectPath == rhs.currentProjectPath
             && currentProjectName == rhs.currentProjectName
@@ -181,6 +182,8 @@ StateListener::StateListener(QObject *parent) :
     Core::ICore *core = Core::ICore::instance();
     connect(core->fileManager(), SIGNAL(currentFileChanged(QString)),
             this, SLOT(slotStateChanged()));
+    connect(core->editorManager()->instance(), SIGNAL(currentEditorStateChanged(Core::IEditor*)),
+            this, SLOT(slotStateChanged()));
 
     if (ProjectExplorer::ProjectExplorerPlugin *pe = ProjectExplorer::ProjectExplorerPlugin::instance())
         connect(pe, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)),
@@ -228,6 +231,7 @@ void StateListener::slotStateChanged()
         if (isTempFile || state.currentFile.contains(QLatin1Char('#')))
             state.currentFile.clear();
     }
+
     // Get the file and its control. Do not use the file unless we find one
     Core::IVersionControl *fileControl = 0;
     if (!state.currentFile.isEmpty()) {
-- 
GitLab