|
@@ -571,7 +571,7 @@ public partial class View
|
|
/// </para>
|
|
/// </para>
|
|
/// </remarks>
|
|
/// </remarks>
|
|
/// <param name="region">The content-relative region that needs to be redrawn.</param>
|
|
/// <param name="region">The content-relative region that needs to be redrawn.</param>
|
|
- public virtual void SetNeedsDisplay (Rectangle region)
|
|
|
|
|
|
+ public void SetNeedsDisplay (Rectangle region)
|
|
{
|
|
{
|
|
if (!IsInitialized)
|
|
if (!IsInitialized)
|
|
{
|
|
{
|
|
@@ -593,12 +593,12 @@ public partial class View
|
|
_needsDisplayRect = new (x, y, w, h);
|
|
_needsDisplayRect = new (x, y, w, h);
|
|
}
|
|
}
|
|
|
|
|
|
- SuperView?.SetSubViewNeedsDisplay ();
|
|
|
|
-
|
|
|
|
Margin?.SetNeedsDisplay ();
|
|
Margin?.SetNeedsDisplay ();
|
|
Border?.SetNeedsDisplay ();
|
|
Border?.SetNeedsDisplay ();
|
|
Padding?.SetNeedsDisplay ();
|
|
Padding?.SetNeedsDisplay ();
|
|
|
|
|
|
|
|
+ SuperView?.SetSubViewNeedsDisplay ();
|
|
|
|
+
|
|
foreach (View subview in Subviews)
|
|
foreach (View subview in Subviews)
|
|
{
|
|
{
|
|
if (subview.Frame.IntersectsWith (region))
|
|
if (subview.Frame.IntersectsWith (region))
|
|
@@ -616,9 +616,16 @@ public partial class View
|
|
{
|
|
{
|
|
SubViewNeedsDisplay = true;
|
|
SubViewNeedsDisplay = true;
|
|
|
|
|
|
- if (SuperView is { } && !SuperView.SubViewNeedsDisplay)
|
|
|
|
|
|
+ if (SuperView is { SubViewNeedsDisplay: false })
|
|
{
|
|
{
|
|
SuperView.SetSubViewNeedsDisplay ();
|
|
SuperView.SetSubViewNeedsDisplay ();
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this is Adornment adornment)
|
|
|
|
+ {
|
|
|
|
+ adornment.Parent?.SetSubViewNeedsDisplay ();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|