X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=21e13c82052709c7ea6addfa63f5cfd396c172b5;hp=263b879c7b45561367378d1c813c603eb7093a4c;hb=91a31a5bdf35ebea5818c3809467b6fb74a547a2;hpb=1602fbdc34bd22bd4aea868bef40fb513012414c diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 263b879..21e13c8 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -266,6 +266,17 @@ void TextLabel::SetProperty(BaseObject* object, Property::Index index, const Pro case Toolkit::TextLabel::Property::TEXT: { impl.mController->SetText(value.Get()); + + if(impl.mController->HasAnchors()) + { + // Forward input events to controller + impl.EnableGestureDetection(static_cast(GestureType::TAP)); + } + else + { + impl.DisableGestureDetection(static_cast(GestureType::TAP)); + } + break; } case Toolkit::TextLabel::Property::FONT_FAMILY: @@ -318,6 +329,16 @@ void TextLabel::SetProperty(BaseObject* object, Property::Index index, const Pro { const bool enableMarkup = value.Get(); impl.mController->SetMarkupProcessorEnabled(enableMarkup); + + if(impl.mController->HasAnchors()) + { + // Forward input events to controller + impl.EnableGestureDetection(static_cast(GestureType::TAP)); + } + else + { + impl.DisableGestureDetection(static_cast(GestureType::TAP)); + } break; } case Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL: @@ -804,10 +825,6 @@ void TextLabel::OnInitialize() self.LayoutDirectionChangedSignal().Connect(this, &TextLabel::OnLayoutDirectionChanged); - // Forward input events to controller - EnableGestureDetection(static_cast(GestureType::TAP)); - GetTapGestureDetector().SetMaximumTapsRequired(1); - Layout::Engine& engine = mController->GetLayoutEngine(); engine.SetCursorWidth(0u); // Do not layout space for the cursor. @@ -858,9 +875,6 @@ void TextLabel::OnTap(const TapGesture& gesture) padding = Self().GetProperty(Toolkit::Control::Property::PADDING); const Vector2& localPoint = gesture.GetLocalPoint(); mController->AnchorEvent(localPoint.x - padding.start, localPoint.y - padding.top); - - // parents can also listen for tap gesture events - Dali::DevelActor::SetNeedGesturePropagation(Self(), true); } void TextLabel::AnchorClicked(const std::string& href)