diff --git a/ApplicationCode/UserInterface/RIViewer.cpp b/ApplicationCode/UserInterface/RIViewer.cpp index 1ebba0330f..d82c33b554 100644 --- a/ApplicationCode/UserInterface/RIViewer.cpp +++ b/ApplicationCode/UserInterface/RIViewer.cpp @@ -97,8 +97,8 @@ RIViewer::RIViewer(const QGLFormat& format, QWidget* parent) m_animationProgress->setFormat("Time Step: %v/%m"); m_animationProgress->setTextVisible(true); - QCDEStyle myStyle; - m_animationProgress->setStyle(&myStyle); + m_progressBarStyle = new QCDEStyle(); + m_animationProgress->setStyle(m_progressBarStyle); m_showAnimProgress = false; // Histogram @@ -120,6 +120,7 @@ RIViewer::~RIViewer() delete m_InfoLabel; delete m_animationProgress; delete m_histogramWidget; + delete m_progressBarStyle; } diff --git a/ApplicationCode/UserInterface/RIViewer.h b/ApplicationCode/UserInterface/RIViewer.h index 6b11bbe430..b09ce90448 100644 --- a/ApplicationCode/UserInterface/RIViewer.h +++ b/ApplicationCode/UserInterface/RIViewer.h @@ -29,6 +29,7 @@ class RimReservoirView; class QLabel; class QProgressBar; class RiuSimpleHistogramWidget; +class QCDEStyle; namespace cvf { @@ -88,6 +89,7 @@ private: RiuSimpleHistogramWidget* m_histogramWidget; bool m_showHistogram; + QCDEStyle* m_progressBarStyle; cvf::ref m_legend1;