From: Agnelo Vaz Date: Fri, 18 Sep 2015 10:23:59 +0000 (+0100) Subject: Prevent font data being cleared when System font changes X-Git-Tag: dali_1.1.4~16 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=42c26e1e4195716f1f8a1537920194e4063af9a4;hp=37e368d48d56b9b419263534b7de165ea990cbac 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 --- 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 );