Due to the LazyUpdate for ImageView's property,
sometimes ResourceReady signal comes even resource is not ready.
This patch make if we have some LazyUpdate properties, skip current signal
and wait next valid ResourceReady signal
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
// Callback for View ResourceReady signal
private void OnResourceReady(IntPtr data)
{
// Callback for View ResourceReady signal
private void OnResourceReady(IntPtr data)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
+
ResourceReadyEventArgs e = new ResourceReadyEventArgs();
if (data != null)
{
ResourceReadyEventArgs e = new ResourceReadyEventArgs();
if (data != null)
{
return base.GetNaturalSize();
}
return base.GetNaturalSize();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override bool CheckResourceReady()
+ {
+ // If we have some properties to be updated, this signal is old thing.
+ // We need to ignore current signal, and wait next.
+ return !(imagePropertyUpdateProcessAttachedFlag && imagePropertyUpdatedFlag);
+ }
+
private void OnResourceLoaded(IntPtr view)
{
private void OnResourceLoaded(IntPtr view)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
ResourceLoadedEventArgs e = new ResourceLoadedEventArgs();
e.Status = (ResourceLoadingStatusType)Interop.View.GetVisualResourceStatus(this.SwigCPtr, Property.IMAGE);
ResourceLoadedEventArgs e = new ResourceLoadedEventArgs();
e.Status = (ResourceLoadingStatusType)Interop.View.GetVisualResourceStatus(this.SwigCPtr, Property.IMAGE);
private void OnResourcesLoaded(IntPtr view)
{
private void OnResourcesLoaded(IntPtr view)
{
+ if(!CheckResourceReady())
+ {
+ return;
+ }
+
if (resourcesLoadedEventHandler != null)
{
resourcesLoadedEventHandler(this, null);
if (resourcesLoadedEventHandler != null)
{
resourcesLoadedEventHandler(this, null);
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected virtual bool CheckResourceReady()
+ {
+ return true;
+ }
+
private ViewSelectorData EnsureSelectorData()
{
if (themeData == null) themeData = new ThemeData();
private ViewSelectorData EnsureSelectorData()
{
if (themeData == null) themeData = new ThemeData();