From e738c9ec891f3219fd330028bca57dfe2df0a485 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 5 Feb 2019 15:09:00 +0100 Subject: [PATCH] wrong handling of terminations of unrelated animators fixed --- src/controls/QskSkinTransition.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/controls/QskSkinTransition.cpp b/src/controls/QskSkinTransition.cpp index da032586..b1cbd8b4 100644 --- a/src/controls/QskSkinTransition.cpp +++ b/src/controls/QskSkinTransition.cpp @@ -179,6 +179,25 @@ namespace it.second.start(); } + bool isRunning() const + { + if ( !m_hintAnimatorMap.empty() ) + { + const auto& animator = m_hintAnimatorMap.begin()->second; + if ( animator.isRunning() ) + return true; + } + + if ( !m_graphicFilterAnimatorMap.empty() ) + { + const auto& animator = m_graphicFilterAnimatorMap.begin()->second; + if ( animator.isRunning() ) + return true; + } + + return false; + } + inline QVariant animatedHint( QskAspect::Aspect aspect ) const { auto it = m_hintAnimatorMap.find( aspect ); @@ -470,8 +489,13 @@ namespace auto group = *it; if ( group->window() == window ) { - m_animatorGroups.erase( it ); - delete group; + if ( !group->isRunning() ) + { + // The notification might be for other animators + + m_animatorGroups.erase( it ); + delete group; + } break; }