mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user