Change-Id: Ic794e633b284c1257126343ac6c0f6ec615868da
for( std::size_t v = 0; iter != endIter; ++iter,v+=4 )
{
for( std::size_t v = 0; iter != endIter; ++iter,v+=4 )
{
QuadCoordinates& quad = *iter;
// top-left (v+0)
QuadCoordinates& quad = *iter;
// top-left (v+0)
mHighlightQuadList.clear();
mHighlightQuadList.clear();
- mHighlightRenderer.SetDepthIndex( mTextDepth - 2u ); // text is rendered at mTextDepth and text's shadow at mTextDepth -1u.
+ if( mHighlightRenderer )
+ {
+ mHighlightRenderer.SetDepthIndex( mTextDepth - 2u ); // text is rendered at mTextDepth and text's shadow at mTextDepth -1u.
+ }
return ( mEventData && mEventData->mIsShowingPlaceholderText );
}
return ( mEventData && mEventData->mIsShowingPlaceholderText );
}
+ bool IsShowingRealText() const
+ {
+ return ( !IsShowingPlaceholderText() &&
+ 0u != mLogicalModel->mText.Count() );
+ }
+
/**
* @brief Called when placeholder-text is hidden
*/
/**
* @brief Called when placeholder-text is hidden
*/
if( NULL != mImpl->mEventData )
{
if( NULL != mImpl->mEventData )
{
- const bool isShowingPlaceholderText = mImpl->IsShowingPlaceholderText();
- if( !isShowingPlaceholderText &&
- ( EventData::EDITING == mImpl->mEventData->mState ) )
+ if( mImpl->IsShowingRealText() &&
+ EventData::EDITING == mImpl->mEventData->mState )
{
mImpl->ChangeState( EventData::EDITING_WITH_GRAB_HANDLE );
}
{
mImpl->ChangeState( EventData::EDITING_WITH_GRAB_HANDLE );
}
mImpl->RequestRelayout();
}
mImpl->RequestRelayout();
}
- else if( !isShowingPlaceholderText &&
- mImpl->mEventData->mSelectionEnabled &&
- ( 2u == tapCount ) )
+ else if( 2u == tapCount )
- SelectEvent( x, y, false );
+ if( mImpl->mEventData->mSelectionEnabled &&
+ mImpl->IsShowingRealText() )
+ {
+ SelectEvent( x, y, false );
+ }