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 (#5070)
* Fix curves not showing up after moving plots to multi plot * Fix typo in RiuQwtPlotWidget::closeEvent * Fix incompatibility with release-branch
This commit is contained in:
parent
f0e728d303
commit
5fae9646ae
@ -78,10 +78,9 @@ RiuQwtPlotWidget::RiuQwtPlotWidget( RimPlotInterface* plotTrackDefinition, QWidg
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuQwtPlotWidget::~RiuQwtPlotWidget()
|
RiuQwtPlotWidget::~RiuQwtPlotWidget()
|
||||||
{
|
{
|
||||||
if ( plotDefinition() )
|
// The destructor may be called later when deleting with QWidget::deleteLater()
|
||||||
{
|
// If you are recreating the widget, then calling something that detaches QwtCurves
|
||||||
plotDefinition()->detachAllCurves();
|
// here may cause them to detach from the new widget rather than the old.
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -567,6 +566,18 @@ void RiuQwtPlotWidget::showEvent( QShowEvent* event )
|
|||||||
QwtPlot::showEvent( event );
|
QwtPlot::showEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuQwtPlotWidget::closeEvent( QCloseEvent* event )
|
||||||
|
{
|
||||||
|
if ( plotDefinition() )
|
||||||
|
{
|
||||||
|
plotDefinition()->detachAllCurves();
|
||||||
|
}
|
||||||
|
QwtPlot::closeEvent( event );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -109,6 +109,7 @@ protected:
|
|||||||
bool eventFilter( QObject* watched, QEvent* event ) override;
|
bool eventFilter( QObject* watched, QEvent* event ) override;
|
||||||
void hideEvent( QHideEvent* event ) override;
|
void hideEvent( QHideEvent* event ) override;
|
||||||
void showEvent( QShowEvent* event ) override;
|
void showEvent( QShowEvent* event ) override;
|
||||||
|
void closeEvent( QCloseEvent* event ) override;
|
||||||
|
|
||||||
void applyAxisTitleToQwt( QwtPlot::Axis axis );
|
void applyAxisTitleToQwt( QwtPlot::Axis axis );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user