#12210 Optionally update the content of Result Info and Depth plot when time step changes

This commit is contained in:
Kristian Bendiksen committed 2025-03-21 14:09:34 +01:00
1 parent a9890af031
commit 2ce846dd98
3 files changed
+29 -6

No files matched your search

@@ -103,6 +103,18 @@ void Riu3dSelectionManager::appendItemToSelection( RiuSelectionItem* item, int r
if ( role == RUI_APPLICATION_GLOBAL ) m_selectionChangedHandler->handleItemAppended( item );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Riu3dSelectionManager::updateSelectedItems()
{
m_selectionChangedHandler->handleSelectionDeleted();
for ( RiuSelectionItem* item : m_selection[RUI_APPLICATION_GLOBAL] )
{
m_selectionChangedHandler->handleItemAppended( item );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -88,6 +88,8 @@ public:
return dynamic_cast<T*>( selectedItem( role ) );
}
void updateSelectedItems();
private:
Riu3dSelectionManager();
~Riu3dSelectionManager();
@@ -20,11 +20,10 @@
#include "RiaGuiApplication.h"
#include "RigEclipseCaseData.h"
#include "Rim3dView.h"
#include "RimEclipseCase.h"
#include "RimCase.h"
#include "Riu3dSelectionManager.h"
#include "RiuMainWindow.h"
#include "RiuMohrsCirclePlot.h"
#include "RiuPvtPlotPanel.h"
@@ -33,9 +32,6 @@
#include "RiuRelativePermeabilityPlotUpdater.h"
#include "RiuResultQwtPlot.h"
#include "cvfDebugTimer.h"
#include "cvfTrace.h"
#include <QDateTime>
//==================================================================================================
@@ -90,4 +86,17 @@ void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView )
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();
}