mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 23:50:19 -05:00
2025.04.0 Merge dev into main
This commit is contained in:
1 parent
e9ec8cb718
commit
f96374a6b4
969 files changed
+40872
-31569
No files matched your search
@@ -21,16 +21,18 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCase.h"
|
||||
|
||||
#include "Riu3dSelectionManager.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuMohrsCirclePlot.h"
|
||||
#include "RiuPvtPlotPanel.h"
|
||||
#include "RiuPvtPlotUpdater.h"
|
||||
#include "RiuRelativePermeabilityPlotPanel.h"
|
||||
#include "RiuRelativePermeabilityPlotUpdater.h"
|
||||
#include "RiuResultQwtPlot.h"
|
||||
|
||||
#include "cvfDebugTimer.h"
|
||||
#include "cvfTrace.h"
|
||||
#include <QDateTime>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -61,6 +63,7 @@ RiuTimeStepChangedHandler* RiuTimeStepChangedHandler::instance()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView ) const
|
||||
{
|
||||
if ( !changedView ) return;
|
||||
if ( !RiaGuiApplication::isRunning() ) return;
|
||||
|
||||
RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater = RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
|
||||
@@ -69,6 +72,31 @@ void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView )
|
||||
RiuPvtPlotUpdater* pvtPlotUpdater = RiuMainWindow::instance()->pvtPlotPanel()->plotUpdater();
|
||||
pvtPlotUpdater->updateOnTimeStepChanged( changedView );
|
||||
|
||||
if ( changedView->ownerCase() )
|
||||
{
|
||||
int ts = changedView->currentTimeStep();
|
||||
const auto dates = changedView->ownerCase()->timeStepDates();
|
||||
if ( dates.size() > (size_t)ts )
|
||||
{
|
||||
auto resultPlot = RiuMainWindow::instance()->resultPlot();
|
||||
resultPlot->showTimeStep( dates[ts] );
|
||||
resultPlot->replot();
|
||||
}
|
||||
}
|
||||
|
||||
RiuMohrsCirclePlot* mohrsCirclePlot = RiuMainWindow::instance()->mohrsCirclePlot();
|
||||
if ( mohrsCirclePlot ) mohrsCirclePlot->updateOnTimeStepChanged( changedView );
|
||||
|
||||
std::vector<RiuSelectionItem*> selectedItems;
|
||||
Riu3dSelectionManager::instance()->selectedItems( selectedItems );
|
||||
|
||||
for ( RiuSelectionItem* item : selectedItems )
|
||||
{
|
||||
if ( RiuEclipseSelectionItem* eclipseItem = dynamic_cast<RiuEclipseSelectionItem*>( item ) )
|
||||
{
|
||||
eclipseItem->m_timestepIdx = changedView->currentTimeStep();
|
||||
}
|
||||
}
|
||||
|
||||
Riu3dSelectionManager::instance()->updateSelectedItems();
|
||||
}
|
||||
Reference in new issue
Block a user