projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for cursor position when there is no text and no place holder text.
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
text-controller.cpp
diff --git
a/dali-toolkit/internal/text/text-controller.cpp
b/dali-toolkit/internal/text/text-controller.cpp
index
3b9c725
..
68555b7
100644
(file)
--- a/
dali-toolkit/internal/text/text-controller.cpp
+++ b/
dali-toolkit/internal/text/text-controller.cpp
@@
-1016,7
+1016,12
@@
void Controller::CalculateTextAlignment( const Size& size )
// Get the direction of the first character.
const CharacterDirection firstParagraphDirection = mImpl->mLogicalModel->GetCharacterDirection( 0u );
// Get the direction of the first character.
const CharacterDirection firstParagraphDirection = mImpl->mLogicalModel->GetCharacterDirection( 0u );
- const Size& actualSize = mImpl->mVisualModel->GetActualSize();
+ Size actualSize = mImpl->mVisualModel->GetActualSize();
+ if( fabsf( actualSize.height ) < Math::MACHINE_EPSILON_1000 )
+ {
+ // Get the line height of the default font.
+ actualSize.height = mImpl->GetDefaultFontLineHeight();
+ }
// If the first paragraph is right to left swap ALIGN_BEGIN and ALIGN_END;
LayoutEngine::HorizontalAlignment horizontalAlignment = mImpl->mLayoutEngine.GetHorizontalAlignment();
// If the first paragraph is right to left swap ALIGN_BEGIN and ALIGN_END;
LayoutEngine::HorizontalAlignment horizontalAlignment = mImpl->mLayoutEngine.GetHorizontalAlignment();