mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(591) Only possible to link property filter between same-case-views
This commit is contained in:
parent
658849eefc
commit
14dedf5d4a
@ -370,14 +370,22 @@ void RimViewController::updateOptionSensitivity()
|
||||
{
|
||||
this->m_syncCellResult.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncCellResult = false;
|
||||
this->m_syncPropertyFilters.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncPropertyFilters = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_syncCellResult.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
if (isPropertyFilterControlPossible())
|
||||
{
|
||||
this->m_syncPropertyFilters.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_syncPropertyFilters.uiCapability()->setUiReadOnly(true);
|
||||
this->m_syncPropertyFilters = false;
|
||||
}
|
||||
|
||||
|
||||
if (isRangeFilterControlPossible())
|
||||
{
|
||||
@ -771,12 +779,45 @@ bool RimViewController::isRangeFiltersControlled()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::isPropertyFilterControlPossible()
|
||||
{
|
||||
// The cases need to be the same
|
||||
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>(masterView());
|
||||
|
||||
if (geomView)
|
||||
{
|
||||
RimGeoMechView* depGeomView = managedGeoView();
|
||||
if (depGeomView && geomView->geoMechCase() == depGeomView->geoMechCase())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(masterView());
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
RimEclipseView* depEclipseView = managedEclipseView();
|
||||
if (depEclipseView && eclipseView->eclipseCase() == depEclipseView->eclipseCase())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::isPropertyFilterOveridden()
|
||||
{
|
||||
if (!isPropertyFilterControlPossible()) return false;
|
||||
|
||||
if (ownerViewLinker()->isActive() && this->m_isActive())
|
||||
{
|
||||
return m_syncPropertyFilters;
|
||||
|
@ -95,6 +95,7 @@ private:
|
||||
|
||||
bool isMasterAndDepViewDifferentType();
|
||||
bool isRangeFilterControlPossible();
|
||||
bool isPropertyFilterControlPossible();
|
||||
|
||||
RimEclipseView* managedEclipseView();
|
||||
RimGeoMechView* managedGeoView();
|
||||
|
Loading…
Reference in New Issue
Block a user