Commit 99c09ce6497efc357e1a60e0a8e08edc7e7e7fbe
[dali_1.4.4] Merge branch 'devel/master'
Change-Id: I72f1bc225c8ae2ab3ee88b1c0a46e6af60e9c29d
Showing
2 changed files
with
13 additions
and
10 deletions
examples/animated-vector-images/animated-vector-images-example.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2018 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2019 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -157,17 +157,20 @@ private: |
| 157 | 157 | Property::Map map = imageView.GetProperty< Property::Map >( ImageView::Property::IMAGE ); |
| 158 | 158 | Property::Value* value = map.Find( DevelImageVisual::Property::PLAY_STATE ); |
| 159 | 159 | |
| 160 | - if( value->Get< int >() != static_cast< int >( DevelImageVisual::PlayState::PLAYING ) ) | |
| 160 | + if( value ) | |
| 161 | 161 | { |
| 162 | - mPlayButtons[controlIndex].SetProperty( Button::Property::LABEL, "Pause" ); | |
| 162 | + if( value->Get< int >() != static_cast< int >( DevelImageVisual::PlayState::PLAYING ) ) | |
| 163 | + { | |
| 164 | + mPlayButtons[controlIndex].SetProperty( Button::Property::LABEL, "Pause" ); | |
| 163 | 165 | |
| 164 | - DevelControl::DoAction( imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PLAY, Property::Value() ); | |
| 165 | - } | |
| 166 | - else | |
| 167 | - { | |
| 168 | - mPlayButtons[controlIndex].SetProperty( Button::Property::LABEL, "Play" ); | |
| 166 | + DevelControl::DoAction( imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PLAY, Property::Value() ); | |
| 167 | + } | |
| 168 | + else | |
| 169 | + { | |
| 170 | + mPlayButtons[controlIndex].SetProperty( Button::Property::LABEL, "Play" ); | |
| 169 | 171 | |
| 170 | - DevelControl::DoAction( imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Value() ); | |
| 172 | + DevelControl::DoAction( imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Value() ); | |
| 173 | + } | |
| 171 | 174 | } |
| 172 | 175 | |
| 173 | 176 | return true; | ... | ... |