From d390f6e39741d700752ca5d401073712b172ce0d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 24 Mar 2014 14:42:34 +0200 Subject: [PATCH] ClearCase: Update view data when topLevel is changed Change-Id: I9d471dea120dd78382245faac04acc9cd44c3b4a Reviewed-by: Knut Petter Svendsen Reviewed-by: Tobias Hunger --- src/plugins/clearcase/clearcaseplugin.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index ba615d06eda..eb4b2c91044 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -845,8 +845,13 @@ void ClearCasePlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as) const VcsBase::VcsBasePluginState state = currentState(); const bool hasTopLevel = state.hasTopLevel(); m_commandLocator->setEnabled(hasTopLevel); - if (hasTopLevel) - m_topLevel = state.topLevel(); + if (hasTopLevel) { + const QString topLevel = state.topLevel(); + if (m_topLevel != topLevel) { + m_topLevel = topLevel; + m_viewData = ccGetView(topLevel); + } + } m_updateViewAction->setParameter(m_viewData.isDynamic ? QString() : m_viewData.name);