mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-23 15:03:27 -06:00
(#371) RiuViewerCommands: Used the new exec commands
This commit is contained in:
parent
930760eb47
commit
85ea085c4e
@ -81,19 +81,19 @@ void RicRangeFilterNewExec::redo()
|
||||
if (m_iSlice)
|
||||
{
|
||||
rangeFilter->cellCountI = 1;
|
||||
rangeFilter->name = QString("I Slice Filter (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
rangeFilter->name = QString("Slice I (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
}
|
||||
|
||||
if (m_jSlice)
|
||||
{
|
||||
rangeFilter->cellCountJ = 1;
|
||||
rangeFilter->name = QString("J Slice Filter (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
rangeFilter->name = QString("Slice J (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
}
|
||||
|
||||
if (m_kSlice)
|
||||
{
|
||||
rangeFilter->cellCountK = 1;
|
||||
rangeFilter->name = QString("K Slice Filter (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
rangeFilter->name = QString("Slice K (%1)").arg(cellRangeFilterCollection->rangeFilters().size());
|
||||
}
|
||||
|
||||
if (m_iSliceStart > -1) rangeFilter->startIndexI = m_iSliceStart;
|
||||
@ -102,6 +102,7 @@ void RicRangeFilterNewExec::redo()
|
||||
|
||||
cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED);
|
||||
cellRangeFilterCollection->reservoirView()->scheduleGeometryRegen(RANGE_FILTERED_INACTIVE);
|
||||
cellRangeFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
|
@ -56,6 +56,10 @@
|
||||
|
||||
#include <QStatusBar>
|
||||
#include "RiuFemResultTextBuilder.h"
|
||||
#include "Commands\RicRangeFilterNewExec.h"
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "Commands\RicGeoMechPropertyFilterNewExec.h"
|
||||
#include "Commands\RicEclipsePropertyFilterNewExec.h"
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@ -213,8 +217,29 @@ void RiuViewerCommands::createSliceRangeFilter(int ijOrk)
|
||||
size_t i, j, k;
|
||||
ijkFromCellIndex(m_currentGridIdx, m_currentCellIndex, &i, &j, &k);
|
||||
|
||||
RimCellRangeFilterCollection* rangeFilterCollection = eclipseView->rangeFilterCollection();
|
||||
|
||||
RicRangeFilterNewExec* filterExec = new RicRangeFilterNewExec(rangeFilterCollection);
|
||||
|
||||
if (ijOrk == 0){
|
||||
filterExec->m_iSlice = true;
|
||||
filterExec->m_iSliceStart = CVF_MAX(static_cast<int>(i + 1), 1);
|
||||
}
|
||||
else if (ijOrk == 1){
|
||||
filterExec->m_jSlice = true;
|
||||
filterExec->m_jSliceStart = CVF_MAX(static_cast<int>(j + 1), 1);
|
||||
|
||||
}
|
||||
else if (ijOrk == 2){
|
||||
filterExec->m_kSlice = true;
|
||||
filterExec->m_kSliceStart = CVF_MAX(static_cast<int>(k + 1), 1);
|
||||
}
|
||||
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(filterExec);
|
||||
|
||||
#if 0 // OBSOLETE
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel_OBSOLETE();
|
||||
if (myModel)
|
||||
{
|
||||
RimCellRangeFilterCollection* rangeFilterCollection = eclipseView->rangeFilterCollection();
|
||||
@ -252,6 +277,7 @@ void RiuViewerCommands::createSliceRangeFilter(int ijOrk)
|
||||
|
||||
mainWindow->setCurrentObjectInTreeView(rangeFilter);
|
||||
}
|
||||
#endif
|
||||
|
||||
eclipseView->setSurfaceDrawstyle();
|
||||
}
|
||||
@ -292,8 +318,12 @@ void RiuViewerCommands::slotAddEclipsePropertyFilter()
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(m_reservoirView.p());
|
||||
if (eclipseView)
|
||||
{
|
||||
RimEclipsePropertyFilterCollection* filterCollection = eclipseView->propertyFilterCollection();
|
||||
RicEclipsePropertyFilterNewExec* propCmdExe = new RicEclipsePropertyFilterNewExec(filterCollection);
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(propCmdExe);
|
||||
#if 0 // OBSOLETE
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel_OBSOLETE();
|
||||
if (myModel)
|
||||
{
|
||||
RimEclipsePropertyFilterCollection* filterCollection = eclipseView->propertyFilterCollection();
|
||||
@ -305,6 +335,7 @@ void RiuViewerCommands::slotAddEclipsePropertyFilter()
|
||||
|
||||
mainWindow->setCurrentObjectInTreeView(propertyFilter);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,8 +347,13 @@ void RiuViewerCommands::slotAddGeoMechPropertyFilter()
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(m_reservoirView.p());
|
||||
if (geoMechView)
|
||||
{
|
||||
RimGeoMechPropertyFilterCollection* filterCollection = geoMechView->propertyFilterCollection();
|
||||
RicGeoMechPropertyFilterNewExec* propCmdExe = new RicGeoMechPropertyFilterNewExec(filterCollection);
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(propCmdExe);
|
||||
|
||||
#if 0 // OBSOLETE
|
||||
RiuMainWindow* mainWindow = RiuMainWindow::instance();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel();
|
||||
RimUiTreeModelPdm* myModel = mainWindow->uiPdmModel_OBSOLETE();
|
||||
if (myModel)
|
||||
{
|
||||
RimGeoMechPropertyFilterCollection* filterCollection = geoMechView->propertyFilterCollection();
|
||||
@ -329,6 +365,7 @@ void RiuViewerCommands::slotAddGeoMechPropertyFilter()
|
||||
|
||||
mainWindow->setCurrentObjectInTreeView(propertyFilter);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user