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;
|
||||
parentObj->firstAnchestorOrThisOfType(rangeFilterColl);
|
||||
|
||||
if (view && rangeFilterColl)
|
||||
if (rangeFilterColl)
|
||||
{
|
||||
view->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
view->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
rangeFilterColl->updateUiUpdateDisplayModel();
|
||||
}
|
||||
|
||||
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
||||
|
@ -65,9 +65,7 @@ void RicRangeFilterInsertExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
|
@ -68,9 +68,7 @@ void RicRangeFilterNewExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
@ -87,8 +85,7 @@ void RicRangeFilterNewExec::undo()
|
||||
|
||||
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
|
||||
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
m_cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
m_cellRangeFilterCollection->updateUiUpdateDisplayModel();
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "RigCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -81,8 +82,7 @@ void RimCellRangeFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
{
|
||||
computeAndSetValidValues();
|
||||
|
||||
CVF_ASSERT(parentContainer());
|
||||
parentContainer()->fieldChangedByUi(changedField, oldValue, newValue);
|
||||
parentContainer()->updateUiUpdateDisplayModel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
@ -48,7 +49,6 @@ RimCellRangeFilterCollection::RimCellRangeFilterCollection()
|
||||
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
isActive.uiCapability()->setUiHidden(true);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -67,7 +67,6 @@ void RimCellRangeFilterCollection::setReservoirView(RimView* reservoirView)
|
||||
m_reservoirView = reservoirView;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// RimCellRangeFilter is using Eclipse 1-based indexing, adjust filter values before
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -142,37 +139,27 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
updateUiUpdateDisplayModel();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::updateUiUpdateDisplayModel()
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
CVF_ASSERT(m_reservoirView);
|
||||
|
||||
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
m_reservoirView->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
#include "RimCellRangeFilter.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RigActiveCellInfo;
|
||||
class RigFemPartCollection;
|
||||
class RigGridBase;
|
||||
class RimView;
|
||||
class RigFemPartCollection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -42,9 +43,6 @@ public:
|
||||
caf::PdmChildArrayField<RimCellRangeFilter*> rangeFilters;
|
||||
|
||||
// Methods
|
||||
RimCellRangeFilter* createAndAppendRangeFilter();
|
||||
void remove(RimCellRangeFilter* rangeFilter);
|
||||
|
||||
void compoundCellRangeFilter(cvf::CellRangeFilter* cellRangeFilter, size_t gridIndex) const;
|
||||
bool hasActiveFilters() const;
|
||||
bool hasActiveIncludeFilters() const;
|
||||
@ -58,6 +56,8 @@ public:
|
||||
|
||||
RigActiveCellInfo* activeCellInfo() const;
|
||||
|
||||
void updateUiUpdateDisplayModel();
|
||||
|
||||
// Overridden methods
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
Loading…
Reference in New Issue
Block a user