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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user