mMaximumNumberOfCharacters(50u),
mHiddenInput(NULL),
mInputFilter(nullptr),
- mLastHeightForWidth(0.0f, 0.0f),
mRecalculateNaturalSize(true),
mMarkupProcessorEnabled(false),
mClipboardHideEnabled(true),
HiddenText* mHiddenInput; ///< Avoid allocating this when the user does not specify hidden input mode.
std::unique_ptr<InputFilter> mInputFilter; ///< Avoid allocating this when the user does not specify input filter mode.
Vector2 mTextFitContentSize; ///< Size of Text fit content
- Vector2 mLastHeightForWidth; ///< Size of Text content from GetHeightForWidth
bool mRecalculateNaturalSize : 1; ///< Whether the natural size needs to be recalculated.
bool mMarkupProcessorEnabled : 1; ///< Whether the mark-up procesor is enabled.
EventHandler::ProcessModifyEvents(controller);
Controller::Impl& impl = *controller.mImpl;
+ ModelPtr& model = impl.mModel;
+ VisualModelPtr& visualModel = model->mVisualModel;
TextUpdateInfo& textUpdateInfo = impl.mTextUpdateInfo;
Size layoutSize;
- if(fabsf(width - impl.mLastHeightForWidth.width) > Math::MACHINE_EPSILON_1000 ||
+ if(fabsf(width - visualModel->mControlSize.width) > Math::MACHINE_EPSILON_1000 ||
textUpdateInfo.mFullRelayoutNeeded ||
textUpdateInfo.mClearAll)
{
Size sizeRequestedWidthAndMaxHeight = Size(width, MAX_FLOAT);
layoutSize = CalculateLayoutSizeOnRequiredControllerSize(controller, sizeRequestedWidthAndMaxHeight, requestedOperationsMask);
- impl.mLastHeightForWidth.width = width;
- impl.mLastHeightForWidth.height = layoutSize.height;
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::GetHeightForWidth calculated %f\n", layoutSize.height);
}
else
{
- layoutSize = impl.mLastHeightForWidth;
+ layoutSize = visualModel->GetLayoutSize();
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::GetHeightForWidth cached %f\n", layoutSize.height);
}