mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
parent
7a954804ef
commit
93f754102d
@ -131,6 +131,7 @@ RimPlotCurve::~RimPlotCurve()
|
|||||||
{
|
{
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
|
m_plotCurve->detach();
|
||||||
delete m_plotCurve;
|
delete m_plotCurve;
|
||||||
m_plotCurve = nullptr;
|
m_plotCurve = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,8 @@ RiuQtChartsPlotCurve::~RiuQtChartsPlotCurve()
|
|||||||
{
|
{
|
||||||
if ( m_plotWidget && m_plotWidget->qtChart() )
|
if ( m_plotWidget && m_plotWidget->qtChart() )
|
||||||
{
|
{
|
||||||
|
m_plotWidget->detach( this );
|
||||||
|
|
||||||
auto* line = lineSeries();
|
auto* line = lineSeries();
|
||||||
if ( line )
|
if ( line )
|
||||||
{
|
{
|
||||||
@ -184,7 +186,11 @@ void RiuQtChartsPlotCurve::detach()
|
|||||||
scatterSeries()->hide();
|
scatterSeries()->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_plotWidget ) setVisibleInLegend( false );
|
if ( m_plotWidget )
|
||||||
|
{
|
||||||
|
m_plotWidget->detach( this );
|
||||||
|
setVisibleInLegend( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -814,6 +814,15 @@ void RiuQtChartsPlotWidget::attach( RiuPlotCurve* plotCurve,
|
|||||||
addToChart( m_scatterSeriesMap, plotCurve, scatterSeries, xAxis, yAxis, qtChartsPlotCurve );
|
addToChart( m_scatterSeriesMap, plotCurve, scatterSeries, xAxis, yAxis, qtChartsPlotCurve );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuQtChartsPlotWidget::detach( RiuPlotCurve* plotCurve )
|
||||||
|
{
|
||||||
|
m_lineSeriesMap.erase( plotCurve );
|
||||||
|
m_scatterSeriesMap.erase( plotCurve );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -162,6 +162,7 @@ public:
|
|||||||
QtCharts::QAbstractSeries* scatterSeries,
|
QtCharts::QAbstractSeries* scatterSeries,
|
||||||
RiuPlotAxis xAxis,
|
RiuPlotAxis xAxis,
|
||||||
RiuPlotAxis yAxis );
|
RiuPlotAxis yAxis );
|
||||||
|
void detach( RiuPlotCurve* plotCurve );
|
||||||
|
|
||||||
QtCharts::QAbstractSeries* getLineSeries( const RiuPlotCurve* plotCurve ) const;
|
QtCharts::QAbstractSeries* getLineSeries( const RiuPlotCurve* plotCurve ) const;
|
||||||
QtCharts::QAbstractSeries* getScatterSeries( const RiuPlotCurve* plotCurve ) const;
|
QtCharts::QAbstractSeries* getScatterSeries( const RiuPlotCurve* plotCurve ) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user