mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix curves not showing up after moving plots to multi plot
This commit is contained in:
@@ -76,10 +76,9 @@ RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlot* plot, QWidget* parent )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuQwtPlotWidget::~RiuQwtPlotWidget()
|
||||
{
|
||||
if ( m_plotDefinition )
|
||||
{
|
||||
m_plotDefinition->detachAllCurves();
|
||||
}
|
||||
// The destructor may be called later when deleting with QWidget::deleteLater()
|
||||
// If you are recreating the widget, then calling something that detaches QwtCurves
|
||||
// here may cause them to detach from the new widget rather than the old.
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -545,6 +544,18 @@ void RiuQwtPlotWidget::showEvent( QShowEvent* event )
|
||||
QwtPlot::showEvent( event );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQwtPlotWidget::closeEvent( QCloseEvent* event )
|
||||
{
|
||||
if ( m_plotDefinition )
|
||||
{
|
||||
m_plotDefinition->detachAllCurves();
|
||||
}
|
||||
RiuQwtPlotWidget::closeEvent( event );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user