(#539) Added framework for update of range filter based on master

Propagate pointer to a range filter if only a single filter is modified
Moved lifetime management of range filter collection to RimView
This commit is contained in:
Magne Sjaastad
2015-10-19 12:10:18 +02:00
parent 1c3e9d8751
commit ab0e3819a1
16 changed files with 209 additions and 45 deletions

View File

@@ -140,17 +140,28 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
{
updateIconState();
updateDisplayModeNotifyManagedViews();
updateDisplayModeNotifyManagedViews(NULL);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews()
void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter)
{
RimView* view = NULL;
firstAnchestorOrThisOfType(view);
if (view->isMasterView())
{
RimViewLinker* viewLinker = view->assosiatedViewLinker();
if (viewLinker)
{
// Update data for range filter
// Update of display model is handled by view->scheduleGeometryRegen, also for managed views
viewLinker->updateRangeFilters(changedRangeFilter);
}
}
view->scheduleGeometryRegen(RANGE_FILTERED);
view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
@@ -321,7 +332,7 @@ void RimCellRangeFilterCollection::updateIconState()
bool activeIcon = true;
RimViewController* viewController = baseView()->viewController();
if (viewController && ( viewController->isRangeFilterOveridden()
if (viewController && ( viewController->isRangeFiltersControlled()
|| viewController->isVisibleCellsOveridden()) )
{
activeIcon = false;