X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.cpp;h=a1283fbf0ed9e16ddac214bd74a537fc49122bda;hp=ef10a3f5fab98943c7bb606213af94d5d41fc2ea;hb=42c26e1e4195716f1f8a1537920194e4063af9a4;hpb=fcbd0fc67ae67b5f068f09483a765d4afa7bd52b diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index ef10a3f..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 ); @@ -1256,7 +1255,7 @@ void Controller::KeyboardFocusLostEvent() { mImpl->ChangeState( EventData::INACTIVE ); - if( mImpl->IsShowingPlaceholderText() ) + if( !mImpl->IsShowingRealText() ) { // Revert to regular placeholder-text when not editing ShowPlaceholderText(); @@ -1523,6 +1522,11 @@ void Controller::TapEvent( unsigned int tapCount, float x, float y ) else if( EventData::EDITING != mImpl->mEventData->mState && EventData::EDITING_WITH_GRAB_HANDLE != mImpl->mEventData->mState ) { + if( mImpl->IsShowingPlaceholderText() && ! mImpl->IsFocusedPlaceholderAvailable() ) + { + // Hide placeholder text + ResetText(); + } // Show cursor on first tap mImpl->ChangeState( EventData::EDITING ); relayoutNeeded = true; @@ -1606,6 +1610,9 @@ void Controller::LongPressEvent( Gesture::State state, float x, float y ) } else { + // Reset the imf manger to commit the pre-edit before selecting the text. + mImpl->ResetImfManager(); + SelectEvent( x, y, false ); } }