Adjustments for release

* Add notification of parent object when multiple objects are updated

* Make sure unchecked curves are removed from track

* Use object names instead of "Sub Items" when possible

* Set default simulation well visualization to top of reservoir

* Show plot window after plot is created

* Allow setting plot rendering flags

* Add more plots for update when clicking in 3D view

* Seismic Difference: Fix typo for poly line data extraction

* Version RC_5
This commit is contained in:
Magne Sjaastad
2023-06-16 09:27:35 +02:00
committed by GitHub
parent 36811e7f94
commit 06b5c9afbf
25 changed files with 184 additions and 32 deletions

View File

@@ -156,14 +156,14 @@ RiuPlotMainWindow* RiuPlotMainWindow::instance()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::onWellSelected( QString wellName )
void RiuPlotMainWindow::onWellSelected( const QString& wellName, int timeStep )
{
RiuPlotMainWindow* plotWnd = instance();
if ( !plotWnd ) return;
if ( !plotWnd->selection3DLinkEnabled() ) return;
RimMainPlotCollection::current()->updateSelectedWell( wellName );
RimMainPlotCollection::current()->updateSelectedWell( wellName, timeStep );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -60,7 +60,7 @@ public:
~RiuPlotMainWindow() override;
static RiuPlotMainWindow* instance();
static void onWellSelected( QString wellName );
static void onWellSelected( const QString& wellName, int timeStep );
QString mainWindowName() override;

View File

@@ -78,6 +78,7 @@
//--------------------------------------------------------------------------------------------------
RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlot* plotDefinition, QWidget* parent )
: RiuPlotWidget( plotDefinition, parent )
, m_titleRenderingFlags( Qt::AlignHCenter | Qt::TextSingleLine )
{
auto* layout = new QVBoxLayout;
layout->setContentsMargins( 0, 0, 0, 0 );
@@ -248,9 +249,18 @@ void RiuQwtPlotWidget::setPlotTitleFontSize( int titleFontSize )
QFont font = title.font();
font.setPixelSize( caf::FontTools::pointSizeToPixelSize( titleFontSize ) );
title.setFont( font );
title.setRenderFlags( title.renderFlags() | Qt::TextWordWrap );
m_plot->setTitle( title );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::setPlotTitleRenderingFlags( int flags )
{
m_titleRenderingFlags = flags;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -668,7 +678,7 @@ void RiuQwtPlotWidget::applyPlotTitleToQwt()
{
QString plotTitleToApply = m_plotTitleEnabled ? m_plotTitle : QString( "" );
QwtText plotTitle = m_plot->title();
plotTitle.setRenderFlags( Qt::AlignHCenter | Qt::TextSingleLine );
plotTitle.setRenderFlags( m_titleRenderingFlags );
if ( plotTitleToApply != plotTitle.text() )
{
plotTitle.setText( plotTitleToApply );

View File

@@ -101,6 +101,7 @@ public:
void setPlotTitleEnabled( bool enabled ) override;
bool plotTitleEnabled() const override;
void setPlotTitleFontSize( int titleFontSize ) override;
void setPlotTitleRenderingFlags( int flags );
void setLegendFontSize( int fontSize ) override;
void setInternalLegendVisible( bool visible ) override;
@@ -234,4 +235,6 @@ private:
std::map<RiuPlotAxis, QwtAxisId> m_axisMapping;
QPointer<QwtPlot> m_plot;
int m_titleRenderingFlags;
};

View File

@@ -832,7 +832,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
RiuPlotMainWindow::onWellSelected( eclipseWellSourceInfo->well()->name() );
RiuPlotMainWindow::onWellSelected( eclipseWellSourceInfo->well()->name(), mainOrComparisonView->currentTimeStep() );
RiuMainWindow::instance()->selectAsCurrentItem( eclipseWellSourceInfo->well(), allowActiveViewChange );
}
else if ( wellConnectionSourceInfo )