X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fcontrol%2Fcontrol-data-impl.cpp;h=84d44b9010deaf6387c29f1684d1151fc64349a1;hp=4c747047df1f9cb19daea3ba8666378a6a3e0c21;hb=5ec47f9bbaf3e4cf13a708edf9dad6c5c8d8e451;hpb=3de943270298245987651685a725178af995032b diff --git a/dali-toolkit/internal/controls/control/control-data-impl.cpp b/dali-toolkit/internal/controls/control/control-data-impl.cpp index 4c74704..84d44b9 100644 --- a/dali-toolkit/internal/controls/control/control-data-impl.cpp +++ b/dali-toolkit/internal/controls/control/control-data-impl.cpp @@ -909,6 +909,24 @@ void Control::Impl::StartObservingVisual(Toolkit::Visual::Base& visual) visualImpl.AddEventObserver(*this); } +void Control::Impl::ResourceReady(bool relayoutRequest) +{ + Actor self = mControlImpl.Self(); + // A visual is ready so control may need relayouting if staged + if(relayoutRequest && self.GetProperty(Actor::Property::CONNECTED_TO_SCENE)) + { + mControlImpl.RelayoutRequest(); + } + + // Emit signal if all enabled visuals registered by the control are ready or there are no visuals. + if(IsResourceReady()) + { + // Reset the flag + mNeedToEmitResourceReady = false; + EmitResourceReadySignal(); + } +} + // Called by a Visual when it's resource is ready void Control::Impl::ResourceReady(Visual::Base& object) { @@ -938,20 +956,8 @@ void Control::Impl::ResourceReady(Visual::Base& object) } } - // A visual is ready so control may need relayouting if staged - if(self.GetProperty(Actor::Property::CONNECTED_TO_SCENE)) - { - mControlImpl.RelayoutRequest(); - } - - // Emit signal if all enabled visuals registered by the control are ready. - if(IsResourceReady()) - { - // Reset the flag - mNeedToEmitResourceReady = false; - - EmitResourceReadySignal(); - } + // Called by a Visual when it's resource is ready + ResourceReady(true); } void Control::Impl::NotifyVisualEvent(Visual::Base& object, Property::Index signalId)