(#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

@@ -55,6 +55,7 @@
#include <QMessageBox>
#include "RimViewLinker.h"
#include "cafPdmUiTreeOrdering.h"
@@ -74,10 +75,6 @@ RimGeoMechView::RimGeoMechView(void)
cellResult = new RimGeoMechCellColors();
cellResult.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_rangeFilterCollection, "RangeFilters", "Range Filters", "", "", "");
m_rangeFilterCollection = new RimCellRangeFilterCollection();
m_rangeFilterCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_propertyFilterCollection, "PropertyFilters", "Property Filters", "", "", "");
m_propertyFilterCollection = new RimGeoMechPropertyFilterCollection();
m_propertyFilterCollection.uiCapability()->setUiHidden(true);
@@ -575,8 +572,24 @@ void RimGeoMechView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalV
//--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateIconStateForFilterCollections()
{
// NB - notice that it is the filter collection managed by this view that the icon update applies to
m_rangeFilterCollection()->updateIconState();
// NB - notice that it is the filter collection managed by this view that the icon update applies to
m_propertyFilterCollection()->updateIconState();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
uiTreeOrdering.add(m_overlayInfoConfig());
uiTreeOrdering.add(cellResult());
uiTreeOrdering.add(m_rangeFilterCollection());
uiTreeOrdering.add(m_propertyFilterCollection());
uiTreeOrdering.setForgetRemainingFields(true);
}