| 781 | } |
| 782 | |
| 783 | void UIStyle::removeAnimation( const PropertyDefinition* propertyDefinition, |
| 784 | const Uint32& propertyIndex ) { |
| 785 | std::vector<Action*> previousTransitions = |
| 786 | mWidget->getActionsByTag( propertyDefinition->getId() ); |
| 787 | std::vector<Action*> removeTransitions; |
| 788 | StyleSheetPropertyAnimation* prevTransition = NULL; |
| 789 | |
| 790 | if ( !previousTransitions.empty() ) { |
| 791 | for ( auto& transition : previousTransitions ) { |
| 792 | if ( transition->getId() == StyleSheetPropertyAnimation::ID ) { |
| 793 | StyleSheetPropertyAnimation* tmpTransition = |
| 794 | static_cast<StyleSheetPropertyAnimation*>( transition ); |
| 795 | if ( propertyDefinition->isIndexed() ) { |
| 796 | if ( tmpTransition->getPropertyIndex() == propertyIndex ) { |
| 797 | prevTransition = tmpTransition; |
| 798 | removeTransitions.push_back( prevTransition ); |
| 799 | } |
| 800 | } else { |
| 801 | prevTransition = tmpTransition; |
| 802 | removeTransitions.push_back( prevTransition ); |
| 803 | break; |
| 804 | } |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | mWidget->removeActions( removeTransitions ); |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | StyleSheetProperty* UIStyle::getLocalProperty( Uint32 propId ) { |
| 813 | StyleSheetProperty* defProperty = mDefinition ? mDefinition->getProperty( propId ) : nullptr; |
nothing calls this directly
no test coverage detected