caf::Viewer: Add inComparisonView option to isAnimationActive

#4994 preparations
This commit is contained in:
Jacob Støren 2019-11-08 10:38:45 +01:00
parent 0f6a4c0934
commit c27c19ce96
2 changed files with 30 additions and 11 deletions

View File

@ -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;
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -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; }