MCPcopy Create free account
hub / github.com/SpartanJ/eepp / removeAnimation

Method removeAnimation

src/eepp/ui/uistyle.cpp:783–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783void 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
812StyleSheetProperty* UIStyle::getLocalProperty( Uint32 propId ) {
813 StyleSheetProperty* defProperty = mDefinition ? mDefinition->getProperty( propId ) : nullptr;

Callers

nothing calls this directly

Calls 5

getActionsByTagMethod · 0.80
push_backMethod · 0.80
getIdMethod · 0.65
emptyMethod · 0.45
removeActionsMethod · 0.45

Tested by

no test coverage detected