mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#483) Gray out overridden range and property collections
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewLink.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
@@ -138,7 +138,7 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
updateIconState();
|
||||
|
||||
updateDisplayModeNotifyManagedViews();
|
||||
}
|
||||
@@ -155,16 +155,6 @@ void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews()
|
||||
view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
/*
|
||||
RimProject* proj = NULL;
|
||||
view->firstAnchestorOrThisOfType(proj);
|
||||
|
||||
RimViewLinker* viewLinker = proj->findViewLinkerFromView(view);
|
||||
if (viewLinker)
|
||||
{
|
||||
viewLinker->updateRangeFilters();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -186,7 +176,7 @@ void RimCellRangeFilterCollection::initAfterRead()
|
||||
rangeFilter->updateIconState();
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
updateIconState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -323,3 +313,26 @@ RimView* RimCellRangeFilterCollection::baseView() const
|
||||
return rimView;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::updateIconState()
|
||||
{
|
||||
bool activeIcon = true;
|
||||
|
||||
RimViewLink* viewLink = RimViewLinker::viewLinkForView(baseView());
|
||||
if (viewLink && viewLink->syncRangeFilters())
|
||||
{
|
||||
activeIcon = false;
|
||||
}
|
||||
|
||||
if (!isActive)
|
||||
{
|
||||
activeIcon = false;
|
||||
}
|
||||
|
||||
updateUiIconFromState(activeIcon);
|
||||
|
||||
uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user