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-impl.cpp;h=795a92957cd720b4bfa0b298235b860223f20e92;hp=cff37b1a93f34183f3d9b4ff75dd172fd9d101c0;hb=f246a43aa659a547e8a86e38e50761735cb9be9e;hpb=dcf0eeebe1e683b311b675e93adcc21a0602e671 diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index cff37b1..795a929 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -33,7 +33,7 @@ namespace { #if defined(DEBUG_ENABLED) - Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_CONTROLS"); + Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS"); #endif /** @@ -277,6 +277,8 @@ bool Controller::Impl::ProcessInputEvents() void Controller::Impl::UpdateModel( OperationsMask operationsRequired ) { + DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::UpdateModel\n" ); + // Calculate the operations to be done. const OperationsMask operations = static_cast( mOperationsPending & operationsRequired ); @@ -461,6 +463,7 @@ void Controller::Impl::GetDefaultFonts( Vector& fonts, Length numberOfC { if( mFontDefaults ) { + DALI_LOG_INFO( gLogFilter, Debug::Concise, "Controller::GetDefaultFonts font family(%s)\n", mFontDefaults->mFontDescription.family.c_str() ); FontRun fontRun; fontRun.characterRun.characterIndex = 0; fontRun.characterRun.numberOfCharacters = numberOfCharacters; @@ -896,10 +899,12 @@ void Controller::Impl::RetrieveSelection( std::string& selectedText, bool delete Vector::Iterator first = currentText.Begin() + startOfSelectedText; Vector::Iterator last = first + lengthOfSelectedText; currentText.Erase( first, last ); + + // Scroll after delete. + mEventData->mPrimaryCursorPosition = handlesCrossed ? mEventData->mRightSelectionPosition : mEventData->mLeftSelectionPosition; + mEventData->mScrollAfterDelete = true; + mEventData->mDecoratorUpdated = true; } - mEventData->mPrimaryCursorPosition = handlesCrossed ? mEventData->mRightSelectionPosition : mEventData->mLeftSelectionPosition; - mEventData->mScrollAfterDelete = true; - mEventData->mDecoratorUpdated = true; } } @@ -1524,7 +1529,7 @@ void Controller::Impl::GetCursorPosition( CharacterIndex logical, cursorInfo.lineHeight = GetDefaultFontLineHeight(); cursorInfo.primaryCursorHeight = cursorInfo.lineHeight; - cursorInfo.primaryPosition.x = mEventData->mDecorator->GetCursorWidth(); + cursorInfo.primaryPosition.x = 0.f; cursorInfo.primaryPosition.y = 0.f; // Nothing else to do. @@ -1793,7 +1798,7 @@ void Controller::Impl::UpdateCursorPosition() { case LayoutEngine::HORIZONTAL_ALIGN_BEGIN: { - cursorPosition.x = mEventData->mDecorator->GetCursorWidth(); + cursorPosition.x = 0.f; break; } case LayoutEngine::HORIZONTAL_ALIGN_CENTER: @@ -1803,7 +1808,7 @@ void Controller::Impl::UpdateCursorPosition() } case LayoutEngine::HORIZONTAL_ALIGN_END: { - cursorPosition.x = mVisualModel->mControlSize.width; + cursorPosition.x = mVisualModel->mControlSize.width - mEventData->mDecorator->GetCursorWidth(); break; } }