mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5397 from OPM/phase-dist-issues
Fixes related to Phase Distribution Plots
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -740,6 +740,14 @@ int RiuQwtPlotWidget::overlayMargins() const
|
||||
return m_overlayMargins;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimViewWindow* RiuQwtPlotWidget::ownerViewWindow() const
|
||||
{
|
||||
return m_plotDefinition;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user