#if DEBUG_DISPOSE
Debug.WriteLine ("Disposing: {0}", this.ToString());
if (IsQueueForRedraw)
- throw new Exception("Trying to dispose an object queued for Redraw: " + this.ToString());
+ throw new Exception("Trying to dispose an object queued for Redraw: " + this.ToString());
#endif
if (currentInterface.HoverWidget != null) {
if (currentInterface.HoverWidget.IsOrIsInside(this))
if (currentInterface.ActiveWidget.IsOrIsInside (this))
currentInterface.ActiveWidget = null;
}
+ if (currentInterface.FocusedWidget != null) {
+ if (currentInterface.FocusedWidget.IsOrIsInside (this))
+ currentInterface.FocusedWidget = null;
+ }
if (!localDataSourceIsNull)
DataSource = null;
parent = null;
}
Unpoped.Raise (this, e);
}
+
+ protected override void Dispose (bool disposing)
+ {
+ if (_content != null && disposing) {
+ if (_content.Parent == null)
+ _content.Dispose ();
+ }
+ base.Dispose (disposing);
+ }
}
}