mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#483) Gray out icon for overridden cell results
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user