mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed unused methods, use updateUiUpdateDisplayModel on RangeFilterCollection
This commit is contained in:
parent
0513608924
commit
b9a8c0743b
@ -80,12 +80,9 @@ void RicDeleteItemExec::redo()
|
|||||||
RimCellRangeFilterCollection* rangeFilterColl;
|
RimCellRangeFilterCollection* rangeFilterColl;
|
||||||
parentObj->firstAnchestorOrThisOfType(rangeFilterColl);
|
parentObj->firstAnchestorOrThisOfType(rangeFilterColl);
|
||||||
|
|
||||||
if (view && rangeFilterColl)
|
if (rangeFilterColl)
|
||||||
{
|
{
|
||||||
view->scheduleGeometryRegen(RANGE_FILTERED);
|
rangeFilterColl->updateUiUpdateDisplayModel();
|
||||||
view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
|
||||||
|
|
||||||
view->scheduleCreateDisplayModelAndRedraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
||||||
|
@ -65,9 +65,7 @@ void RicRangeFilterInsertExec::redo()
|
|||||||
rangeFilter->setDefaultValues();
|
rangeFilter->setDefaultValues();
|
||||||
applyCommandDataOnFilter(rangeFilter);
|
applyCommandDataOnFilter(rangeFilter);
|
||||||
|
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
|
||||||
|
|
||||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||||
|
|
||||||
|
@ -68,9 +68,7 @@ void RicRangeFilterNewExec::redo()
|
|||||||
rangeFilter->setDefaultValues();
|
rangeFilter->setDefaultValues();
|
||||||
applyCommandDataOnFilter(rangeFilter);
|
applyCommandDataOnFilter(rangeFilter);
|
||||||
|
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
|
||||||
|
|
||||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||||
|
|
||||||
@ -87,8 +85,7 @@ void RicRangeFilterNewExec::undo()
|
|||||||
|
|
||||||
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
|
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
|
||||||
|
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
|
||||||
|
|
||||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "RigCaseData.h"
|
#include "RigCaseData.h"
|
||||||
#include "RigGridBase.h"
|
#include "RigGridBase.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimCellRangeFilterCollection.h"
|
#include "RimCellRangeFilterCollection.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
@ -81,8 +82,7 @@ void RimCellRangeFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
|||||||
{
|
{
|
||||||
computeAndSetValidValues();
|
computeAndSetValidValues();
|
||||||
|
|
||||||
CVF_ASSERT(parentContainer());
|
parentContainer()->updateUiUpdateDisplayModel();
|
||||||
parentContainer()->fieldChangedByUi(changedField, oldValue, newValue);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "RigFemPartGrid.h"
|
#include "RigFemPartGrid.h"
|
||||||
#include "RigGeoMechCaseData.h"
|
#include "RigGeoMechCaseData.h"
|
||||||
#include "RigGridBase.h"
|
#include "RigGridBase.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
@ -48,7 +49,6 @@ RimCellRangeFilterCollection::RimCellRangeFilterCollection()
|
|||||||
|
|
||||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||||
isActive.uiCapability()->setUiHidden(true);
|
isActive.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -67,7 +67,6 @@ void RimCellRangeFilterCollection::setReservoirView(RimView* reservoirView)
|
|||||||
m_reservoirView = reservoirView;
|
m_reservoirView = reservoirView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// RimCellRangeFilter is using Eclipse 1-based indexing, adjust filter values before
|
/// RimCellRangeFilter is using Eclipse 1-based indexing, adjust filter values before
|
||||||
// populating cvf::CellRangeFilter (which is 0-based)
|
// populating cvf::CellRangeFilter (which is 0-based)
|
||||||
@ -108,7 +107,6 @@ void RimCellRangeFilterCollection::compoundCellRangeFilter(cvf::CellRangeFilter*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -127,7 +125,6 @@ RigMainGrid* RimCellRangeFilterCollection::mainGrid() const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -142,37 +139,27 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
|
updateUiUpdateDisplayModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimCellRangeFilterCollection::updateUiUpdateDisplayModel()
|
||||||
|
{
|
||||||
this->updateUiIconFromToggleField();
|
this->updateUiIconFromToggleField();
|
||||||
|
|
||||||
CVF_ASSERT(m_reservoirView);
|
|
||||||
|
|
||||||
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED);
|
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED);
|
||||||
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||||
|
|
||||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
RimCellRangeFilter* RimCellRangeFilterCollection::createAndAppendRangeFilter()
|
|
||||||
{
|
|
||||||
RimCellRangeFilter* rangeFilter = new RimCellRangeFilter();
|
|
||||||
rangeFilters.push_back(rangeFilter);
|
|
||||||
rangeFilter->setDefaultValues();
|
|
||||||
|
|
||||||
rangeFilter->name = QString("New Filter (%1)").arg(rangeFilters().size());
|
|
||||||
|
|
||||||
return rangeFilter;
|
|
||||||
}
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -203,21 +190,6 @@ void RimCellRangeFilterCollection::initAfterRead()
|
|||||||
this->updateUiIconFromToggleField();
|
this->updateUiIconFromToggleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimCellRangeFilterCollection::remove(RimCellRangeFilter* rangeFilter)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < rangeFilters.size(); i++)
|
|
||||||
{
|
|
||||||
if (rangeFilters[i] == rangeFilter)
|
|
||||||
{
|
|
||||||
rangeFilters.erase(i);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -19,12 +19,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "RimCellRangeFilter.h"
|
#include "RimCellRangeFilter.h"
|
||||||
|
|
||||||
#include "cafPdmChildArrayField.h"
|
#include "cafPdmChildArrayField.h"
|
||||||
|
|
||||||
class RigActiveCellInfo;
|
class RigActiveCellInfo;
|
||||||
|
class RigFemPartCollection;
|
||||||
class RigGridBase;
|
class RigGridBase;
|
||||||
class RimView;
|
class RimView;
|
||||||
class RigFemPartCollection;
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -42,9 +43,6 @@ public:
|
|||||||
caf::PdmChildArrayField<RimCellRangeFilter*> rangeFilters;
|
caf::PdmChildArrayField<RimCellRangeFilter*> rangeFilters;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
RimCellRangeFilter* createAndAppendRangeFilter();
|
|
||||||
void remove(RimCellRangeFilter* rangeFilter);
|
|
||||||
|
|
||||||
void compoundCellRangeFilter(cvf::CellRangeFilter* cellRangeFilter, size_t gridIndex) const;
|
void compoundCellRangeFilter(cvf::CellRangeFilter* cellRangeFilter, size_t gridIndex) const;
|
||||||
bool hasActiveFilters() const;
|
bool hasActiveFilters() const;
|
||||||
bool hasActiveIncludeFilters() const;
|
bool hasActiveIncludeFilters() const;
|
||||||
@ -58,6 +56,8 @@ public:
|
|||||||
|
|
||||||
RigActiveCellInfo* activeCellInfo() const;
|
RigActiveCellInfo* activeCellInfo() const;
|
||||||
|
|
||||||
|
void updateUiUpdateDisplayModel();
|
||||||
|
|
||||||
// Overridden methods
|
// Overridden methods
|
||||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||||
virtual caf::PdmFieldHandle* objectToggleField();
|
virtual caf::PdmFieldHandle* objectToggleField();
|
||||||
|
Loading…
Reference in New Issue
Block a user