From 4fd7ca81150f0b4d666fce4be313307974c9c2f2 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 22 Sep 2016 15:23:24 +0100 Subject: [PATCH] Ensured disabled batching reverts to ImageVisual Change-Id: Ic1fd2f4c44092c2393cc340d15d3298dcfe8850c --- .../internal/visuals/visual-factory-impl.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.cpp b/dali-toolkit/internal/visuals/visual-factory-impl.cpp index bcc9acd8a6..6baaec2196 100644 --- a/dali-toolkit/internal/visuals/visual-factory-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-factory-impl.cpp @@ -149,16 +149,17 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property } else // Regular image { + bool batchingEnabled( false ); Property::Value* batchingEnabledValue = propertyMap.Find( Toolkit::ImageVisual::Property::BATCHING_ENABLED, BATCHING_ENABLED ); if( batchingEnabledValue ) { - bool batchingEnabled( false ); batchingEnabledValue->Get( batchingEnabled ); - if( batchingEnabled ) - { - visualPtr = new BatchImageVisual( *( mFactoryCache.Get() ) ); - break; - } + } + + if( batchingEnabled ) + { + visualPtr = new BatchImageVisual( *( mFactoryCache.Get() ) ); + break; } else { -- 2.34.1