Merge pull request #5397 from OPM/phase-dist-issues

Fixes related to Phase Distribution Plots
This commit is contained in:
Magne Sjaastad
2020-01-24 15:25:33 +01:00
committed by GitHub
5 changed files with 26 additions and 5 deletions

View File

@@ -160,8 +160,8 @@ void RimWellDistributionPlot::updateLegend()
return;
}
// For now we always show the legend when in multiplot mode
bool doShowLegend = true;
// Hide the legend when in multiplot mode, as the legend is handeled by the multi plot grid layout
bool doShowLegend = false;
if ( isMdiWindow() )
{
doShowLegend = m_showPlotLegends;

View File

@@ -161,6 +161,14 @@ QImage RimWellDistributionPlotCollection::snapshotWindowContent()
//--------------------------------------------------------------------------------------------------
void RimWellDistributionPlotCollection::zoomAll() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellDistributionPlotCollection::userDescriptionField()
{
return &m_plotWindowTitle;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -323,7 +331,7 @@ void RimWellDistributionPlotCollection::fieldChangedByUi( const caf::PdmFieldHan
if ( changedField == &m_case || changedField == &m_timeStepIndex || changedField == &m_wellName ||
changedField == &m_groupSmallContributions || changedField == &m_smallContributionsRelativeThreshold ||
changedField == &m_maximumTof || changedField == &m_showOil || changedField == &m_showGas ||
changedField == &m_showWater )
changedField == &m_showWater || changedField == &m_showWindow )
{
applyPlotParametersToContainedPlots();
shouldRecalculatePlotData = true;

View File

@@ -58,6 +58,8 @@ public:
QImage snapshotWindowContent() override;
void zoomAll() override;
caf::PdmFieldHandle* userDescriptionField() override;
private:
// RimPlotWindow overrides
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,

View File

@@ -740,6 +740,14 @@ int RiuQwtPlotWidget::overlayMargins() const
return m_overlayMargins;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimViewWindow* RiuQwtPlotWidget::ownerViewWindow() const
{
return m_plotDefinition;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -19,10 +19,11 @@
#pragma once
#include "cafUiStyleSheet.h"
#include "RiuInterfaceToViewWindow.h"
#include "cafPdmObject.h"
#include "cafPdmPointer.h"
#include "cafUiStyleSheet.h"
#include "qwt_plot.h"
@@ -52,7 +53,7 @@ class QWheelEvent;
//
//
//==================================================================================================
class RiuQwtPlotWidget : public QwtPlot
class RiuQwtPlotWidget : public QwtPlot, public RiuInterfaceToViewWindow
{
Q_OBJECT
@@ -118,6 +119,8 @@ public:
void renderTo( QPaintDevice* painter, const QRect& targetRect );
int overlayMargins() const;
RimViewWindow* ownerViewWindow() const override;
signals:
void plotSelected( bool toggleSelection );
void axisSelected( int axisId, bool toggleSelection );