(#483) Gray out overridden range and property collections

This commit is contained in:
Magne Sjaastad
2015-09-23 14:35:35 +02:00
parent 4ee8929d91
commit 71e74599ff
11 changed files with 129 additions and 52 deletions

View File

@@ -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();
}