Style object must follow lifespan of RIViewer

p4#: 19288
This commit is contained in:
Magne Sjaastad
2012-10-24 11:01:41 +02:00
parent ddc555d590
commit 54dc3a5d37
2 changed files with 5 additions and 2 deletions

View File

@@ -97,8 +97,8 @@ RIViewer::RIViewer(const QGLFormat& format, QWidget* parent)
m_animationProgress->setFormat("Time Step: %v/%m"); m_animationProgress->setFormat("Time Step: %v/%m");
m_animationProgress->setTextVisible(true); m_animationProgress->setTextVisible(true);
QCDEStyle myStyle; m_progressBarStyle = new QCDEStyle();
m_animationProgress->setStyle(&myStyle); m_animationProgress->setStyle(m_progressBarStyle);
m_showAnimProgress = false; m_showAnimProgress = false;
// Histogram // Histogram
@@ -120,6 +120,7 @@ RIViewer::~RIViewer()
delete m_InfoLabel; delete m_InfoLabel;
delete m_animationProgress; delete m_animationProgress;
delete m_histogramWidget; delete m_histogramWidget;
delete m_progressBarStyle;
} }

View File

@@ -29,6 +29,7 @@ class RimReservoirView;
class QLabel; class QLabel;
class QProgressBar; class QProgressBar;
class RiuSimpleHistogramWidget; class RiuSimpleHistogramWidget;
class QCDEStyle;
namespace cvf namespace cvf
{ {
@@ -88,6 +89,7 @@ private:
RiuSimpleHistogramWidget* m_histogramWidget; RiuSimpleHistogramWidget* m_histogramWidget;
bool m_showHistogram; bool m_showHistogram;
QCDEStyle* m_progressBarStyle;
cvf::ref<cvf::OverlayScalarMapperLegend> m_legend1; cvf::ref<cvf::OverlayScalarMapperLegend> m_legend1;