From 42c26e1e4195716f1f8a1537920194e4063af9a4 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Fri, 18 Sep 2015 11:23:59 +0100 Subject: [PATCH] Prevent font data being cleared when System font changes * Font data is being cleared incorrectly outside of a conditional block, now inside that block Change-Id: Ia3266538323a9ca935622ed3376ca18aad9f54db Signed-off-by: Agnelo Vaz --- dali-toolkit/internal/text/text-controller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index f9979df..a1283fb 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -404,11 +404,10 @@ void Controller::UpdateAfterFontChange( std::string& newDefaultFont ) { DALI_LOG_INFO( gLogFilter, Debug::Concise, "Controller::UpdateAfterFontChange"); - ClearFontData(); - if ( !mImpl->mUserDefinedFontFamily ) // If user defined font then should not update when system font changes { DALI_LOG_INFO( gLogFilter, Debug::Concise, "Controller::UpdateAfterFontChange newDefaultFont(%s)\n", newDefaultFont.c_str() ); + ClearFontData(); mImpl->mFontDefaults->mFontDescription.family = newDefaultFont; mImpl->UpdateModel( ALL_OPERATIONS ); mImpl->QueueModifyEvent( ModifyEvent::TEXT_REPLACED ); -- 2.7.4