ClearCase: Update view data when topLevel is changed

Change-Id: I9d471dea120dd78382245faac04acc9cd44c3b4a
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2014-03-24 14:42:34 +02:00
committed by Orgad Shaneh
parent 72d116ba6b
commit d390f6e397

View File

@@ -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);