mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
(#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:
parent
1c3e9d8751
commit
ab0e3819a1
@ -87,7 +87,7 @@ void RicDeleteItemExec::redo()
|
||||
|
||||
if (rangeFilterColl)
|
||||
{
|
||||
rangeFilterColl->updateDisplayModeNotifyManagedViews();
|
||||
rangeFilterColl->updateDisplayModeNotifyManagedViews(NULL);
|
||||
}
|
||||
|
||||
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
||||
|
@ -65,7 +65,7 @@ void RicRangeFilterInsertExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews();
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
|
@ -68,7 +68,7 @@ void RicRangeFilterNewExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews();
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
@ -85,7 +85,7 @@ void RicRangeFilterNewExec::undo()
|
||||
|
||||
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews();
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ void RimCellRangeFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
{
|
||||
computeAndSetValidValues();
|
||||
|
||||
parentContainer()->updateDisplayModeNotifyManagedViews();
|
||||
parentContainer()->updateDisplayModeNotifyManagedViews(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
RigActiveCellInfo* activeCellInfo() const;
|
||||
|
||||
void updateDisplayModeNotifyManagedViews();
|
||||
void updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter);
|
||||
void updateIconState();
|
||||
|
||||
// Overridden methods
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include <limits.h>
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewController.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
|
||||
|
||||
@ -99,10 +100,6 @@ RimEclipseView::RimEclipseView()
|
||||
faultCollection = new RimFaultCollection;
|
||||
faultCollection.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 RimEclipsePropertyFilterCollection();
|
||||
m_propertyFilterCollection.uiCapability()->setUiHidden(true);
|
||||
@ -135,7 +132,6 @@ RimEclipseView::~RimEclipseView()
|
||||
delete this->cellResult();
|
||||
delete this->cellEdgeResult();
|
||||
|
||||
delete m_rangeFilterCollection;
|
||||
delete m_propertyFilterCollection;
|
||||
delete wellCollection();
|
||||
delete faultCollection();
|
||||
@ -1317,6 +1313,26 @@ void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
cellGroup->add(&showInvalidCells);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||
{
|
||||
uiTreeOrdering.add(m_overlayInfoConfig());
|
||||
|
||||
uiTreeOrdering.add(cellResult());
|
||||
uiTreeOrdering.add(cellEdgeResult());
|
||||
uiTreeOrdering.add(faultResultSettings());
|
||||
|
||||
uiTreeOrdering.add(wellCollection());
|
||||
uiTreeOrdering.add(faultCollection());
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1649,7 +1665,8 @@ void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalV
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::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();
|
||||
}
|
||||
|
@ -134,6 +134,7 @@ public:
|
||||
protected:
|
||||
virtual void initAfterRead();
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "");
|
||||
|
||||
private:
|
||||
void createDisplayModel();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,10 @@ public:
|
||||
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType);
|
||||
void updateIconStateForFilterCollections();
|
||||
|
||||
protected:
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "");
|
||||
|
||||
|
||||
private:
|
||||
virtual void createDisplayModel();
|
||||
virtual void updateDisplayModelVisibility();
|
||||
|
@ -104,6 +104,16 @@ RimView::RimView(void)
|
||||
CAF_PDM_InitFieldNoDefault(&windowGeometry, "WindowGeometry", "", "", "", "");
|
||||
windowGeometry.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_rangeFilterCollection, "RangeFilters", "Range Filters", "", "", "");
|
||||
m_rangeFilterCollection = new RimCellRangeFilterCollection();
|
||||
m_rangeFilterCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_overrideRangeFilterCollection, "RangeFiltersControlled", "Range Filters (controlled)", "", "", "");
|
||||
m_overrideRangeFilterCollection = new RimCellRangeFilterCollection();
|
||||
m_overrideRangeFilterCollection.uiCapability()->setUiHidden(true);
|
||||
m_overrideRangeFilterCollection.xmlCapability()->setIOWritable(false);
|
||||
m_overrideRangeFilterCollection.xmlCapability()->setIOReadable(false);
|
||||
|
||||
m_previousGridModeMeshLinesWasFaults = false;
|
||||
}
|
||||
|
||||
@ -120,6 +130,9 @@ RimView::~RimView(void)
|
||||
}
|
||||
|
||||
delete m_viewer;
|
||||
|
||||
delete m_rangeFilterCollection;
|
||||
delete m_overrideRangeFilterCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -551,7 +564,7 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
{
|
||||
if (m_overrideRangeFilterCollection)
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
{
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
@ -566,7 +579,7 @@ RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimCellRangeFilterCollection* RimView::rangeFilterCollection() const
|
||||
{
|
||||
if (m_overrideRangeFilterCollection)
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
{
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
@ -680,3 +693,12 @@ bool RimView::isMasterView() const
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellRangeFilterCollection* RimView::rangeFilterCollectionCopy()
|
||||
{
|
||||
return m_overrideRangeFilterCollection();
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
class Rim3dOverlayInfoConfig;
|
||||
class RimCase;
|
||||
class RimCellRangeFilter;
|
||||
class RimCellRangeFilterCollection;
|
||||
class RiuViewer;
|
||||
class RimViewLinker;
|
||||
@ -77,7 +78,8 @@ public:
|
||||
|
||||
RimCellRangeFilterCollection* rangeFilterCollection();
|
||||
const RimCellRangeFilterCollection* rangeFilterCollection() const;
|
||||
void setOverrideRangeFilterCollection(RimCellRangeFilterCollection* rfc);
|
||||
|
||||
RimCellRangeFilterCollection* rangeFilterCollectionCopy();
|
||||
|
||||
caf::PdmField< std::vector<int> > windowGeometry;
|
||||
|
||||
@ -169,7 +171,7 @@ protected:
|
||||
caf::PdmChildField<Rim3dOverlayInfoConfig*> m_overlayInfoConfig;
|
||||
|
||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_rangeFilterCollection;
|
||||
caf::PdmPointer<RimCellRangeFilterCollection> m_overrideRangeFilterCollection;
|
||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_overrideRangeFilterCollection;
|
||||
|
||||
// Overridden PDM methods:
|
||||
virtual void setupBeforeSave();
|
||||
@ -180,6 +182,7 @@ protected:
|
||||
|
||||
private:
|
||||
RimViewLinker* viewLinkerIfMasterView() const;
|
||||
void setOverrideRangeFilterCollection(RimCellRangeFilterCollection* rfc);
|
||||
|
||||
private:
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
|
@ -175,7 +175,7 @@ void RimViewController::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
}
|
||||
else if (changedField == &m_syncRangeFilters)
|
||||
{
|
||||
updateOverrides();
|
||||
updateRangeFiltersControl();
|
||||
}
|
||||
else if (changedField == &m_syncPropertyFilters)
|
||||
{
|
||||
@ -246,7 +246,6 @@ void RimViewController::updateOverrides()
|
||||
|
||||
if (isVisibleCellsOveridden())
|
||||
{
|
||||
m_managedView->setOverrideRangeFilterCollection(NULL);
|
||||
if (manEclView) manEclView->setOverridePropertyFilterCollection(NULL);
|
||||
if (manGeoView) manGeoView->setOverridePropertyFilterCollection(NULL);
|
||||
m_managedView->scheduleGeometryRegen(OVERRIDDEN_CELL_VISIBILITY);
|
||||
@ -254,15 +253,6 @@ void RimViewController::updateOverrides()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isRangeFilterOveridden())
|
||||
{
|
||||
m_managedView->setOverrideRangeFilterCollection(masterView->rangeFilterCollection());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_managedView->setOverrideRangeFilterCollection(NULL);
|
||||
}
|
||||
|
||||
RimEclipseView* masterEclipseView = dynamic_cast<RimEclipseView*>(masterView);
|
||||
if (masterEclipseView)
|
||||
{
|
||||
@ -326,7 +316,6 @@ void RimViewController::removeOverrides(RimView* view)
|
||||
RimEclipseView* manEclView = dynamic_cast<RimEclipseView*>(view);
|
||||
RimGeoMechView* manGeoView = dynamic_cast<RimGeoMechView*>(view);
|
||||
|
||||
view->setOverrideRangeFilterCollection(NULL);
|
||||
if (manEclView) manEclView->setOverridePropertyFilterCollection(NULL);
|
||||
if (manGeoView) manGeoView->setOverridePropertyFilterCollection(NULL);
|
||||
}
|
||||
@ -361,19 +350,25 @@ void RimViewController::updateOptionSensitivity()
|
||||
{
|
||||
this->m_syncCellResult.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncCellResult = false;
|
||||
this->m_syncRangeFilters.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncRangeFilters = false;
|
||||
this->m_syncPropertyFilters.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncPropertyFilters = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_syncCellResult.uiCapability()->setUiReadOnly(false);
|
||||
|
||||
this->m_syncRangeFilters.uiCapability()->setUiReadOnly(false);
|
||||
this->m_syncPropertyFilters.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
if (isRangeFilterControlPossible())
|
||||
{
|
||||
this->m_syncRangeFilters.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_syncRangeFilters.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncRangeFilters = false;
|
||||
}
|
||||
|
||||
m_syncVisibleCells.uiCapability()->setUiReadOnly(!this->isMasterAndDepViewDifferentType());
|
||||
}
|
||||
|
||||
@ -470,6 +465,17 @@ void RimViewController::updateResultColorsControl()
|
||||
viewLinker->updateCellResult();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewController::updateRangeFiltersControl()
|
||||
{
|
||||
if (!this->isRangeFiltersControlled()) return;
|
||||
|
||||
RimViewLinker* viewLinker = ownerViewLinker();
|
||||
viewLinker->updateRangeFilters(NULL);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -597,7 +603,7 @@ void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView()
|
||||
if (!this->isActive()) return;
|
||||
|
||||
if (this->isVisibleCellsOveridden()
|
||||
|| this->isRangeFilterOveridden()
|
||||
|| this->isRangeFiltersControlled()
|
||||
|| this->isPropertyFilterOveridden()
|
||||
|| this->isResultColorControlled()
|
||||
)
|
||||
@ -617,7 +623,7 @@ void RimViewController::scheduleGeometryRegenForDepViews(RivCellSetEnum geometry
|
||||
if (!this->isActive()) return;
|
||||
|
||||
if ( this->isVisibleCellsOveridden()
|
||||
|| this->isRangeFilterOveridden()
|
||||
|| this->isRangeFiltersControlled()
|
||||
|| this->isPropertyFilterOveridden()
|
||||
|| this->isResultColorControlled()
|
||||
)
|
||||
@ -709,12 +715,21 @@ bool RimViewController::isVisibleCellsOveridden()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::isRangeFilterControlPossible()
|
||||
{
|
||||
return !isMasterAndDepViewDifferentType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::isRangeFilterOveridden()
|
||||
bool RimViewController::isRangeFiltersControlled()
|
||||
{
|
||||
if (!isRangeFilterControlPossible()) return false;
|
||||
|
||||
if (ownerViewLinker()->isActive() && this->m_isActive())
|
||||
{
|
||||
return m_syncRangeFilters;
|
||||
@ -740,3 +755,60 @@ bool RimViewController::isPropertyFilterOveridden()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewController::updateRangeFilterCollectionOverride(RimView* sourceView, RimCellRangeFilter* changedRangeFilter)
|
||||
{
|
||||
RimCellRangeFilterCollection* filterCollectionCopy = managedView()->rangeFilterCollectionCopy();
|
||||
|
||||
if (!sourceView)
|
||||
{
|
||||
filterCollectionCopy->rangeFilters.deleteAllChildObjects();
|
||||
|
||||
managedView()->rangeFilterCollection()->uiCapability()->updateConnectedEditors();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
RimCellRangeFilterCollection* sourceFilterCollection = sourceView->rangeFilterCollection();
|
||||
|
||||
// TODO: Convert ijk values in source to correct ijk values in our range filter collection
|
||||
|
||||
filterCollectionCopy->rangeFilters.deleteAllChildObjects();
|
||||
|
||||
// Filter copy if ijk-ranges are identical
|
||||
for (size_t i = 0; i < sourceFilterCollection->rangeFilters.size(); i++)
|
||||
{
|
||||
RimCellRangeFilter* sourceFilter = sourceFilterCollection->rangeFilters[i];
|
||||
|
||||
RimCellRangeFilter* filter = new RimCellRangeFilter;
|
||||
filter->startIndexI = sourceFilter->startIndexI;
|
||||
filter->startIndexJ = sourceFilter->startIndexJ;
|
||||
filter->startIndexK = sourceFilter->startIndexK;
|
||||
|
||||
filter->cellCountI = sourceFilter->cellCountI;
|
||||
filter->cellCountJ = sourceFilter->cellCountJ;
|
||||
filter->cellCountK = sourceFilter->cellCountK;
|
||||
|
||||
filterCollectionCopy->rangeFilters.push_back(filter);
|
||||
}
|
||||
|
||||
managedView()->rangeFilterCollection()->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewController::updateRangeFilterOverrides(RimCellRangeFilter* changedRangeFilter)
|
||||
{
|
||||
if (isRangeFiltersControlled())
|
||||
{
|
||||
updateRangeFilterCollectionOverride(masterView(), changedRangeFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateRangeFilterCollectionOverride(NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ class RimEclipseView;
|
||||
class RimGeoMechView;
|
||||
class RimViewLinker;
|
||||
class RigCaseToCaseCellMapper;
|
||||
class RimCellRangeFilter;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -60,9 +61,9 @@ public:
|
||||
bool isTimeStepLinked();
|
||||
|
||||
bool isResultColorControlled();
|
||||
bool isRangeFiltersControlled();
|
||||
|
||||
bool isVisibleCellsOveridden();
|
||||
bool isRangeFilterOveridden();
|
||||
bool isPropertyFilterOveridden();
|
||||
|
||||
void scheduleCreateDisplayModelAndRedrawForDependentView();
|
||||
@ -72,6 +73,8 @@ public:
|
||||
void removeOverrides();
|
||||
void updateDisplayNameAndIcon();
|
||||
|
||||
void updateRangeFilterOverrides(RimCellRangeFilter* changedRangeFilter);
|
||||
|
||||
protected: // Pdm overridden methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly);
|
||||
@ -87,8 +90,13 @@ private:
|
||||
void updateCameraLink();
|
||||
void updateTimeStepLink();
|
||||
void updateResultColorsControl();
|
||||
void updateRangeFiltersControl();
|
||||
|
||||
bool isMasterAndDepViewDifferentType();
|
||||
bool isRangeFilterControlPossible();
|
||||
|
||||
void updateRangeFilterCollectionOverride(RimView* sourceView, RimCellRangeFilter* changedRangeFilter);
|
||||
|
||||
|
||||
RimEclipseView* managedEclipseView();
|
||||
RimGeoMechView* managedGeoView();
|
||||
|
@ -184,13 +184,23 @@ void RimViewLinker::updateCellResult()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewLinker::updateRangeFilters(RimCellRangeFilter* changedRangeFilter)
|
||||
{
|
||||
for (size_t i = 0; i < viewLinks.size(); i++)
|
||||
{
|
||||
RimViewController* viewLink = viewLinks[i];
|
||||
viewLink->updateRangeFilterOverrides(changedRangeFilter);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewLinker::updateOverrides()
|
||||
{
|
||||
|
||||
for (size_t i = 0; i < viewLinks.size(); i++)
|
||||
{
|
||||
RimViewController* viewLink = viewLinks[i];
|
||||
@ -249,6 +259,7 @@ void RimViewLinker::allViewsForCameraSync(RimView* source, std::vector<RimView*>
|
||||
void RimViewLinker::updateDependentViews()
|
||||
{
|
||||
updateOverrides();
|
||||
updateRangeFilters(NULL);
|
||||
|
||||
updateCellResult();
|
||||
updateTimeStep(m_masterView, m_masterView->currentTimeStep());
|
||||
|
@ -36,6 +36,7 @@ namespace cvf
|
||||
class RimViewController;
|
||||
class RiuViewer;
|
||||
class RimView;
|
||||
class RimCellRangeFilter;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -62,6 +63,7 @@ public:
|
||||
void updateScaleZ(RimView* sourceView, double scaleZ);
|
||||
|
||||
void updateCellResult();
|
||||
void updateRangeFilters(RimCellRangeFilter* changedRangeFilter);
|
||||
|
||||
void scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType);
|
||||
void scheduleCreateDisplayModelAndRedrawForDependentViews();
|
||||
|
Loading…
Reference in New Issue
Block a user