浏览代码

Tweaked drawing code.
Added ViewDiagnostics.Draw

Tig 9 月之前
父节点
当前提交
74919832f7

+ 0 - 9
Terminal.Gui/Application/Application.Mouse.cs

@@ -249,15 +249,6 @@ public static partial class Application // Mouse handling
                 View = deepestViewUnderMouse
             };
         }
-
-        // TODO: There should be a clearner way to to this
-        // Add a timeout to ensure at least one application iteration happens after each
-        // mouse event, enabling Refresh to be called.
-        Application.AddTimeout(new (0,0,0,0, 200),
-                               () =>
-                               {
-                                   return false;
-                               });
     }
 
 

+ 63 - 23
Terminal.Gui/Application/Application.Run.cs

@@ -1,6 +1,7 @@
 #nullable enable
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
+using Microsoft.CodeAnalysis.Diagnostics;
 
 namespace Terminal.Gui;
 
@@ -205,6 +206,9 @@ public static partial class Application // Run (Begin, Run, End, Stop)
 
         NotifyNewRunState?.Invoke (toplevel, new (rs));
 
+        // Force an Idle event so that an Iteration (and Refresh) happen.
+        Application.Invoke(() => {});
+
         return rs;
     }
 
@@ -496,45 +500,77 @@ public static partial class Application // Run (Begin, Run, End, Stop)
     /// Only Views that need to be drawn (see <see cref="View.NeedsDisplay"/>) will be drawn.
     /// </summary>
     /// <param name="forceRedraw">If <see langword="true"/> the entire View hierarchy will be redrawn. The default is <see langword="false"/> and should only be overriden for testing.</param>
-    public static void Refresh (bool forceRedraw = false)
+    public static void Refresh (bool forceRedraw = false, object context = null)
     {
-        bool clear = false;
+        //WindowsConsole.InputRecord rec = new WindowsConsole.InputRecord();
+        //if (context is WindowsConsole.InputRecord record)
+        //{
+        //    rec = record;
+        //    if (record is { EventType: WindowsConsole.EventType.Focus })
+        //    {
+        //        return;
+        //    }
+
+        //    if (record is { EventType: WindowsConsole.EventType.Key })
+        //    {
+        //        var key = (WindowsConsole.KeyEventRecord)record.KeyEvent;
+        //        if (key is { dwControlKeyState: WindowsConsole.ControlKeyState.LeftAltPressed })
+        //        {
+        //            return;
+        //        }
+        //    }
+
+        //}
+
+        bool neededLayout = false;
         foreach (Toplevel tl in TopLevels.Reverse ())
         {
             if (tl.NeedsLayout)
             {
-                clear = true;
+                neededLayout = true;
                 tl.Layout (Screen.Size);
             }
         }
 
-        if (clear || forceRedraw)
+        if (forceRedraw)
         {
-            //Driver?.ClearContents ();
+           Driver?.ClearContents ();
         }
 
-        Stack<Toplevel> redrawStack = new (TopLevels);
-
-        while  (redrawStack.Count > 0)
+        foreach (Toplevel tl in TopLevels.Reverse ())
         {
-            Toplevel? tlToDraw = redrawStack.Pop ();
-
-            if (clear || forceRedraw)
+            if (neededLayout)
             {
-                tlToDraw.SetNeedsDisplay ();
+                tl.SetNeedsDisplay ();
             }
 
-            if (!(!View.CanBeVisible (tlToDraw) || tlToDraw is { NeedsDisplay: false, SubViewNeedsDisplay: false }))
-            {
-                tlToDraw.Draw ();
-
-                if (redrawStack.TryPeek (out var nexToplevel))
-                {
-                    nexToplevel.SetNeedsDisplay();
-                }
-            }
+            tl.Draw ();
         }
 
+        // Stack<Toplevel> redrawStack = new (TopLevels);
+
+        //// Debug.WriteLine ($"{DateTime.Now}.{DateTime.Now.Millisecond} - Refresh {rec} = {redrawStack.Count}");
+        // while (redrawStack.Count > 0)
+        // {
+        //     Toplevel? tlToDraw = redrawStack.Pop ();
+
+        //     if (forceRedraw)
+        //     {
+        //         tlToDraw.SetNeedsDisplay ();
+        //     }
+
+        //     if (View.CanBeVisible (tlToDraw))
+        //     {
+        //         bool needs =  tlToDraw.NeedsDisplay || tlToDraw.SubViewNeedsDisplay;
+        //         tlToDraw.Draw ();
+
+        //         if (needs && redrawStack.TryPeek (out var nexToplevel))
+        //         {
+        //             nexToplevel.SetNeedsDisplay ();
+        //         }
+        //     }
+        // }
+
         Driver?.Refresh ();
     }
 
@@ -588,6 +624,7 @@ public static partial class Application // Run (Begin, Run, End, Stop)
     /// <returns><see langword="false"/> if at least one iteration happened.</returns>
     public static bool RunIteration (ref RunState state, bool firstIteration = false)
     {
+        // If the driver has events pending do an iteration of the driver MainLoop
         if (MainLoop!.Running && MainLoop.EventsPending ())
         {
             // Notify Toplevel it's ready
@@ -596,7 +633,10 @@ public static partial class Application // Run (Begin, Run, End, Stop)
                 state.Toplevel.OnReady ();
             }
 
+            object ctx = state.Context;
             MainLoop.RunIteration ();
+            state.Context = ctx;
+
             Iteration?.Invoke (null, new ());
         }
 
@@ -607,7 +647,7 @@ public static partial class Application // Run (Begin, Run, End, Stop)
             return firstIteration;
         }
 
-        Refresh ();
+        Refresh (context: state.Context);
 
         if (PositionCursor ())
         {
@@ -707,6 +747,6 @@ public static partial class Application // Run (Begin, Run, End, Stop)
         runState.Toplevel = null;
         runState.Dispose ();
 
-        Refresh ();
+        Refresh (context: "End");
     }
 }

+ 1 - 0
Terminal.Gui/Application/MainLoop.cs

@@ -247,6 +247,7 @@ internal class MainLoop : IDisposable
         while (Running)
         {
             EventsPending ();
+            object ctx = null;
             RunIteration ();
         }
 

+ 2 - 0
Terminal.Gui/Application/RunState.cs

@@ -10,6 +10,8 @@ public class RunState : IDisposable
     /// <summary>The <see cref="Toplevel"/> belonging to this <see cref="RunState"/>.</summary>
     public Toplevel Toplevel { get; internal set; }
 
+    public object Context { get; internal set; }
+
     /// <summary>Releases all resource used by the <see cref="RunState"/> object.</summary>
     /// <remarks>Call <see cref="Dispose()"/> when you are finished using the <see cref="RunState"/>.</remarks>
     /// <remarks>

+ 14 - 3
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -2193,15 +2193,18 @@ internal class WindowsMainLoop : IMainLoopDriver
                 // Note: ManualResetEventSlim.Wait will wait indefinitely if the timeout is -1. The timeout is -1 when there
                 // are no timers, but there IS an idle handler waiting.
                 _eventReady.Wait (waitTimeout, _eventReadyTokenSource.Token);
+                //
             }
+            _eventReady.Reset ();
         }
         catch (OperationCanceledException)
         {
+            _eventReady.Reset ();
             return true;
         }
         finally
         {
-            _eventReady.Reset ();
+            //_eventReady.Reset ();
         }
 
         if (!_eventReadyTokenSource.IsCancellationRequested)
@@ -2299,10 +2302,18 @@ internal class WindowsMainLoop : IMainLoopDriver
 
             if (_resultQueue?.Count == 0)
             {
-                _resultQueue.Enqueue (_winConsole.ReadConsoleInput ());
+                var input = _winConsole.ReadConsoleInput ();
+
+                //if (input [0].EventType != WindowsConsole.EventType.Focus)
+                {
+                    _resultQueue.Enqueue (input);
+                }
             }
 
-            _eventReady.Set ();
+            if (_resultQueue?.Count > 0)
+            {
+                _eventReady.Set ();
+            }
         }
     }
 

+ 24 - 10
Terminal.Gui/View/Adornment/Border.cs

@@ -105,6 +105,16 @@ public class Border : Adornment
             LayoutStarted += OnLayoutStarted;
     }
 #endif
+        if (View.Diagnostics.HasFlag (ViewDiagnosticFlags.Draw))
+        {
+            _drawIndicator = new SpinnerView ()
+            {
+                X = 1,
+                Style = new SpinnerStyle.Dots2 (),
+                SpinDelay = 0,
+            };
+            Add (_drawIndicator);
+        }
     }
 
 #if SUBVIEW_BASED_BORDER
@@ -566,8 +576,6 @@ public class Border : Adornment
                         break;
                 }
 
-                //Application.Refresh ();
-
                 return true;
             }
         }
@@ -909,6 +917,20 @@ public class Border : Adornment
         return true;
     }
 
+    private SpinnerView? _drawIndicator = null;
+    /// <inheritdoc />
+    protected override bool OnRenderingLineCanvas ()
+    {
+        if (_drawIndicator is { })
+        {
+            _drawIndicator.AdvanceAnimation (false);
+            _drawIndicator.DrawText();
+        }
+
+        RenderLineCanvas ();
+        return true;
+    }
+
     private void SetupGradientLineCanvas (LineCanvas lc, Rectangle rect)
     {
         GetAppealingGradientColors (out List<Color> stops, out List<int> steps);
@@ -1250,8 +1272,6 @@ public class Border : Adornment
                             }
                         }
 
-                        Application.Refresh ();
-
                         return true;
                     });
 
@@ -1274,8 +1294,6 @@ public class Border : Adornment
                             Parent!.Height = Parent.Height! + 1;
                         }
 
-                        Application.Refresh ();
-
                         return true;
                     });
 
@@ -1301,8 +1319,6 @@ public class Border : Adornment
                             }
                         }
 
-                        Application.Refresh ();
-
                         return true;
                     });
 
@@ -1325,8 +1341,6 @@ public class Border : Adornment
                             Parent!.Width = Parent.Width! + 1;
                         }
 
-                        Application.Refresh ();
-
                         return true;
                     });
 

+ 6 - 1
Terminal.Gui/View/View.Diagnostics.cs

@@ -22,7 +22,12 @@ public enum ViewDiagnosticFlags : uint
     /// <summary>
     ///     When enabled the View's colors will be darker when the mouse is hovering over the View (See <see cref="View.MouseEnter"/> and <see cref="View.MouseLeave"/>.
     /// </summary>
-    Hover = 0b_0000_00100
+    Hover = 0b_0000_00100,
+
+    /// <summary>
+    ///     When enabled a draw indicator will be shown; the indicator will change each time the View's Draw method is called with NeedsDisplay set to true.
+    /// </summary>
+    Draw = 0b_0000_01000,
 }
 
 public partial class View

+ 41 - 2
Terminal.Gui/View/View.Drawing.cs

@@ -1,6 +1,7 @@
 #nullable enable
 using System.ComponentModel;
 using System.Diagnostics;
+using Microsoft.CodeAnalysis.Operations;
 
 namespace Terminal.Gui;
 
@@ -37,6 +38,7 @@ public partial class View // Drawing APIs
         DoClearViewport (Viewport);
         DoDrawText (Viewport);
         DoDrawContent (Viewport);
+
         DoDrawSubviews (Viewport);
 
         // Restore the clip before rendering the line canvas and adornment subviews
@@ -100,6 +102,12 @@ public partial class View // Drawing APIs
 
         // TODO: add event.
 
+        // Subviews of Adornments count as subviews
+        if (!NeedsDisplay && !SubViewNeedsDisplay)
+        {
+            return;
+        }
+
         DrawAdornments ();
     }
 
@@ -143,6 +151,11 @@ public partial class View // Drawing APIs
             return;
         }
 
+        if (!NeedsDisplay && !SubViewNeedsDisplay)
+        {
+            return;
+        }
+
         SetNormalAttribute ();
     }
 
@@ -191,6 +204,11 @@ public partial class View // Drawing APIs
             return;
         }
 
+        if (!NeedsDisplay)
+        {
+            return;
+        }
+
         ClearViewport ();
     }
 
@@ -270,6 +288,11 @@ public partial class View // Drawing APIs
             return;
         }
 
+        if (!NeedsDisplay)
+        {
+            return;
+        }
+
         DrawText ();
     }
 
@@ -315,7 +338,7 @@ public partial class View // Drawing APIs
     #endregion DrawText
 
     #region DrawContent
-    
+
     private void DoDrawContent (Rectangle viewport)
     {
         Debug.Assert (viewport == Viewport);
@@ -373,6 +396,11 @@ public partial class View // Drawing APIs
             return;
         }
 
+        if (!SubViewNeedsDisplay)
+        {
+            return;
+        }
+
         DrawSubviews ();
     }
 
@@ -402,12 +430,23 @@ public partial class View // Drawing APIs
             return;
         }
 
-        IEnumerable<View> subviewsNeedingDraw = _subviews.Where (view => view.Visible && (view.NeedsDisplay || view.SubViewNeedsDisplay));
+        IEnumerable<View> subviewsNeedingDraw = _subviews.Where (view => (view.Visible && (view.NeedsDisplay || view.SubViewNeedsDisplay))
+                                                                      );//|| view.Arrangement.HasFlag (ViewArrangement.Overlapped));
 
         foreach (View view in subviewsNeedingDraw)
         {
+            if (view.Arrangement.HasFlag (ViewArrangement.Overlapped))
+            {
+                //view.SetNeedsDisplay ();
+            }
             view.Draw ();
         }
+
+        //var overlapped = subviewsNeedingDraw;
+        //foreach (View view in overlapped)
+        //{
+        //    view.Draw ();
+        //}
     }
 
     #endregion DrawSubviews

+ 2 - 0
Terminal.Gui/View/View.Layout.cs

@@ -165,6 +165,8 @@ public partial class View // Layout APIs
         {
             // Implicit layout is ok here because all Pos/Dim are Absolute values.
             Layout ();
+            // Ensure the next Application iteration tries to layout again
+            SetNeedsLayout ();
         }
     }
 

+ 24 - 5
Terminal.Gui/Views/SpinnerView/SpinnerView.cs

@@ -4,6 +4,8 @@
 // <https://spectreconsole.net/best-practices>.
 //------------------------------------------------------------------------------
 
+using System.Diagnostics;
+
 namespace Terminal.Gui;
 
 /// <summary>A <see cref="View"/> which displays (by default) a spinning line character.</summary>
@@ -113,11 +115,11 @@ public class SpinnerView : View, IDesignable
     ///     ignored based on <see cref="SpinDelay"/>.
     /// </summary>
     /// <remarks>Ensure this method is called on the main UI thread e.g. via <see cref="Application.Invoke"/></remarks>
-    public void AdvanceAnimation ()
+    public void AdvanceAnimation (bool setNeedsDisplay = true)
     {
         if (DateTime.Now - _lastRender > TimeSpan.FromMilliseconds (SpinDelay))
         {
-            if (Sequence is { } && Sequence.Length > 1)
+            if (Sequence is { Length: > 1 })
             {
                 var d = 1;
 
@@ -170,13 +172,30 @@ public class SpinnerView : View, IDesignable
                     }
                 }
 
-                Text = "" + Sequence [_currentIdx]; //.EnumerateRunes;
+               // Text = "" + Sequence [_currentIdx]; //.EnumerateRunes;
             }
 
             _lastRender = DateTime.Now;
         }
 
-        SetNeedsDisplay ();
+        if (setNeedsDisplay)
+        {
+            SetNeedsDisplay ();
+        }
+    }
+
+    /// <inheritdoc />
+    protected override bool OnClearingViewport (Rectangle viewport) { return true; }
+
+    /// <inheritdoc />
+    protected override bool OnDrawingText (Rectangle viewport)
+    {
+        if (Sequence is { Length: > 0 } && _currentIdx < Sequence.Length - 1)
+        {
+            Move (Viewport.X, Viewport.Y);
+            View.Driver?.AddStr (Sequence [_currentIdx]);
+        }
+        return true;
     }
 
     /// <inheritdoc/>
@@ -198,7 +217,7 @@ public class SpinnerView : View, IDesignable
                                            TimeSpan.FromMilliseconds (SpinDelay),
                                            () =>
                                            {
-                                               Application.Invoke (AdvanceAnimation);
+                                               Application.Invoke (() => AdvanceAnimation());
 
                                                return true;
                                            }

+ 37 - 21
UICatalog/Scenarios/Navigation.cs

@@ -1,4 +1,5 @@
-using System.Timers;
+using System.Text;
+using System.Timers;
 using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
@@ -45,11 +46,12 @@ public class Navigation : Scenario
         {
             Title = "_1 Test Frame",
             X = Pos.Right (arrangementEditor),
-            Y = 0,
+            Y = 1,
             Width = Dim.Fill (),
             Height = Dim.Fill ()
         };
 
+
         app.Add (testFrame);
 
         Button button = new ()
@@ -82,30 +84,42 @@ public class Navigation : Scenario
             X = Pos.AnchorEnd (),
             Y = Pos.AnchorEnd (),
             Width = Dim.Fill (),
-            Id = "progressBar"
+            Id = "progressBar",
+            BorderStyle = LineStyle.Rounded
         };
         overlappedView1.Add (progressBar);
 
-        Timer timer = new (10)
-        {
-            AutoReset = true
-        };
+        //Timer timer = new (1)
+        //{
+        //    AutoReset = true
+        //};
+
+        //timer.Elapsed += (o, args) =>
+        //                 {
+        //                     if (progressBar.Fraction == 1.0)
+        //                     {
+        //                         progressBar.Fraction = 0;
+        //                     }
 
-        timer.Elapsed += (o, args) =>
-                         {
-                             if (progressBar.Fraction == 1.0)
-                             {
-                                 progressBar.Fraction = 0;
-                             }
+        //                     progressBar.Fraction += 0.01f;
 
-                             progressBar.Fraction += 0.01f;
+        //                     Application.Invoke (() => progressBar.SetNeedsDisplay ());
+        //                    ;
+        //                 };
+        //timer.Start ();
 
-                             //Application.Wakeup ();
+        Application.Iteration += (sender, args) =>
+                                 {
+                                     if (progressBar.Fraction == 1.0)
+                                     {
+                                         progressBar.Fraction = 0;
+                                     }
 
-                             Application.Invoke (() => progressBar.SetNeedsDisplay ());
-                            ;
-                         };
-        timer.Start ();
+                                     progressBar.Fraction += 0.01f;
+
+                                     Application.Invoke (() => { });
+
+                                 };
 
         View overlappedView2 = CreateOverlappedView (3, 8, 10);
 
@@ -201,7 +215,7 @@ public class Navigation : Scenario
 
         testFrame.SetFocus ();
         Application.Run (app);
-        timer.Close ();
+       // timer.Close ();
         app.Dispose ();
         Application.Shutdown ();
 
@@ -265,7 +279,8 @@ public class Navigation : Scenario
 
         Button button = new ()
         {
-            Title = $"Tiled Button{id} _{GetNextHotKey ()}"
+            Title = $"Tiled Button{id} _{GetNextHotKey ()}",
+            Y = 1,
         };
         overlapped.Add (button);
 
@@ -276,6 +291,7 @@ public class Navigation : Scenario
         };
         overlapped.Add (button);
 
+
         return overlapped;
     }
 

+ 46 - 0
UICatalog/Scenarios/SimpleDialog.cs

@@ -0,0 +1,46 @@
+#nullable enable
+using Terminal.Gui;
+
+namespace UICatalog.Scenarios;
+
+[ScenarioMetadata ("SimpleDialog", "SimpleDialog ")]
+public sealed class SimpleDialog : Scenario
+{
+    public override void Main ()
+    {
+        // Init
+        Application.Init ();
+
+        // Setup - Create a top-level application window and configure it.
+        Window appWindow = new ()
+        {
+            Title = GetQuitKeyAndName (),
+        };
+
+        Dialog dialog = new () { Id = "dialog", Width = 20, Height = 4, Title = "Dialog" };
+        dialog.Arrangement |= ViewArrangement.Resizable;
+
+        var button = new Button
+        {
+            Id = "button", X = Pos.Center (), Y = 1, Text = "_Press me!",
+            WantContinuousButtonPressed = false,
+            HighlightStyle = HighlightStyle.None,
+            ShadowStyle = ShadowStyle.None,
+        };
+
+        button.Accepting += (s, e) =>
+                            {
+                                Application.Run (dialog);
+                                e.Cancel = true;
+                            };
+        appWindow.Add (button);
+        
+        // Run - Start the application.
+        Application.Run (appWindow);
+        dialog.Dispose ();
+        appWindow.Dispose ();
+
+        // Shutdown - Calling Application.Shutdown is required.
+        Application.Shutdown ();
+    }
+}

+ 23 - 7
UICatalog/UICatalog.cs

@@ -1010,7 +1010,8 @@ public class UICatalogApp
             const string OFF = "View Diagnostics: _Off";
             const string RULER = "View Diagnostics: _Ruler";
             const string THICKNESS = "View Diagnostics: _Thickness";
-            const string Hover = "View Diagnostics: _Hover";
+            const string HOVER = "View Diagnostics: _Hover";
+            const string DRAW = "View Diagnostics: _Draw";
             var index = 0;
 
             List<MenuItem> menuItems = new ();
@@ -1028,7 +1029,8 @@ public class UICatalogApp
                 {
                     item.Checked = !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Thickness)
                                    && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Ruler)
-                                   && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Hover);
+                                   && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Hover)
+                                   && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Draw);
                 }
                 else
                 {
@@ -1041,12 +1043,12 @@ public class UICatalogApp
 
                                    if (item.Title == t && item.Checked == false)
                                    {
-                                       _diagnosticFlags &= ~(ViewDiagnosticFlags.Thickness | ViewDiagnosticFlags.Ruler | ViewDiagnosticFlags.Hover);
+                                       _diagnosticFlags &= ~(ViewDiagnosticFlags.Thickness | ViewDiagnosticFlags.Ruler | ViewDiagnosticFlags.Hover | ViewDiagnosticFlags.Draw);
                                        item.Checked = true;
                                    }
                                    else if (item.Title == t && item.Checked == true)
                                    {
-                                       _diagnosticFlags |= ViewDiagnosticFlags.Thickness | ViewDiagnosticFlags.Ruler | ViewDiagnosticFlags.Hover;
+                                       _diagnosticFlags |= ViewDiagnosticFlags.Thickness | ViewDiagnosticFlags.Ruler | ViewDiagnosticFlags.Hover | ViewDiagnosticFlags.Draw;
                                        item.Checked = false;
                                    }
                                    else
@@ -1069,7 +1071,8 @@ public class UICatalogApp
                                        {
                                            menuItem.Checked = !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Ruler)
                                                               && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Thickness)
-                                                              && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Hover);
+                                                              && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Hover)
+                                                              && !_diagnosticFlags.HasFlag (ViewDiagnosticFlags.Draw);
                                        }
                                        else if (menuItem.Title != t)
                                        {
@@ -1091,7 +1094,8 @@ public class UICatalogApp
                     "Off" => OFF,
                     "Ruler" => RULER,
                     "Thickness" => THICKNESS,
-                    "Hover" => Hover,
+                    "Hover" => HOVER,
+                    "Draw" => DRAW,
                     _ => ""
                 };
             }
@@ -1102,7 +1106,8 @@ public class UICatalogApp
                 {
                     RULER => ViewDiagnosticFlags.Ruler,
                     THICKNESS => ViewDiagnosticFlags.Thickness,
-                    Hover => ViewDiagnosticFlags.Hover,
+                    HOVER => ViewDiagnosticFlags.Hover,
+                    DRAW => ViewDiagnosticFlags.Draw,
                     _ => null!
                 };
             }
@@ -1143,6 +1148,17 @@ public class UICatalogApp
                             _diagnosticFlags &= ~ViewDiagnosticFlags.Hover;
                         }
 
+                        break;
+                    case ViewDiagnosticFlags.Draw:
+                        if (add)
+                        {
+                            _diagnosticFlags |= ViewDiagnosticFlags.Draw;
+                        }
+                        else
+                        {
+                            _diagnosticFlags &= ~ViewDiagnosticFlags.Draw;
+                        }
+
                         break;
                     default:
                         _diagnosticFlags = default (ViewDiagnosticFlags);

+ 1 - 1
UnitTests/Views/TableViewTests.cs

@@ -2574,7 +2574,7 @@ A B C
     [SetupFakeDriver]
     public void TestTableViewCheckboxes_ByObject ()
     {
-        Assert.Equal(ConfigurationManager.ConfigLocations.DefaultOnly, ConfigurationManager.Locations);
+        Assert.Equal (ConfigurationManager.ConfigLocations.DefaultOnly, ConfigurationManager.Locations);
         TableView tv = GetPetTable (out EnumerableTableSource<PickablePet> source);
         tv.LayoutSubviews ();
         IReadOnlyCollection<PickablePet> pets = source.Data;