diff --git a/Fwk/AppFwk/cafViewer/cafViewer.cpp b/Fwk/AppFwk/cafViewer/cafViewer.cpp index 41c2c0ef3e..8a1c734a92 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.cpp +++ b/Fwk/AppFwk/cafViewer/cafViewer.cpp @@ -980,21 +980,40 @@ void caf::Viewer::removeAllFrames(bool isForComparisonView) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool caf::Viewer::isAnimationActive() +bool caf::Viewer::isAnimationActive(bool isForComparisonView) { - cvf::Scene* currentScene = m_mainRendering->scene(); - - if (!currentScene) + if ( !isForComparisonView ) { - return false; - } + cvf::Scene* currentScene = m_mainRendering->scene(); - if (m_mainScene.notNull() && m_mainScene.p() == currentScene) + if ( !currentScene ) + { + return false; + } + + if ( m_mainScene.notNull() && m_mainScene.p() == currentScene ) + { + return false; + } + + return true; + } + else { - return false; - } + cvf::Scene* currentScene = m_comparisonMainRendering->scene(); - return true; + if ( !currentScene ) + { + return false; + } + + if ( m_comparisonMainScene.notNull() && m_comparisonMainScene.p() == currentScene ) + { + return false; + } + + return true; + } } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafViewer/cafViewer.h b/Fwk/AppFwk/cafViewer/cafViewer.h index 71fba391c0..4c51fd25bb 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.h +++ b/Fwk/AppFwk/cafViewer/cafViewer.h @@ -124,7 +124,7 @@ public: // As of yet: Only updates bounding boxes. Other things might be added later. void updateCachedValuesInScene(); - bool isAnimationActive(); + bool isAnimationActive(bool isForComparisonView = false); caf::FrameAnimationControl* animationControl() { return m_animationControl;} void setReleaseOGLResourcesEachFrame(bool releaseOGLResourcesEachFrame) { m_releaseOGLResourcesEachFrame = releaseOGLResourcesEachFrame; }