(#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

@@ -18,8 +18,11 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RimGeoMechCellColors.h"
#include "RimLegendConfig.h"
#include "RimView.h"
#include "RimViewLink.h"
#include "RimViewLinker.h"
CAF_PDM_SOURCE_INIT(RimGeoMechCellColors, "GeoMechResultSlot");
@@ -41,3 +44,32 @@ RimGeoMechCellColors::RimGeoMechCellColors(void)
RimGeoMechCellColors::~RimGeoMechCellColors(void)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechCellColors::updateIconState()
{
RimView* rimView = NULL;
this->firstAnchestorOrThisOfType(rimView);
RimViewLink* viewLink = RimViewLinker::viewLinkForView(rimView);
if (viewLink && viewLink->syncCellResult())
{
updateUiIconFromState(false);
}
else
{
updateUiIconFromState(true);
}
uiCapability()->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechCellColors::initAfterRead()
{
updateIconState();
}