(#483) Gray out icon for overridden cell results

This commit is contained in:
Magne Sjaastad
2015-09-23 13:48:25 +02:00
parent af75f513f9
commit 4ee8929d91
6 changed files with 99 additions and 18 deletions

View File

@@ -20,10 +20,13 @@
#include "RimEclipseCellColors.h"
#include "RimEclipseFaultColors.h"
#include "RimEclipseView.h"
#include "RimTernaryLegendConfig.h"
#include "RimViewLink.h"
#include "RimViewLinker.h"
#include "RiuMainWindow.h"
#include "RimEclipseFaultColors.h"
CAF_PDM_SOURCE_INIT(RimEclipseCellColors, "ResultSlot");
@@ -174,6 +177,8 @@ void RimEclipseCellColors::initAfterRead()
}
changeLegendConfig(this->resultVariable());
updateIconState();
}
//--------------------------------------------------------------------------------------------------
@@ -219,3 +224,21 @@ RimLegendConfig* RimEclipseCellColors::legendConfig()
return m_legendConfigPtrField;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseCellColors::updateIconState()
{
RimViewLink* viewLink = RimViewLinker::viewLinkForView(m_reservoirView);
if (viewLink && viewLink->syncCellResult())
{
updateUiIconFromState(false);
}
else
{
updateUiIconFromState(true);
}
uiCapability()->updateConnectedEditors();
}