Преглед на файлове

Fixed TileView & ListView unit test failures

Tig преди 9 месеца
родител
ревизия
008d49788e
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 2 2
      Terminal.Gui/Views/ListView.cs
  2. 1 1
      Terminal.Gui/Views/TileView.cs

+ 2 - 2
Terminal.Gui/Views/ListView.cs

@@ -320,7 +320,7 @@ public class ListView : View, IDesignable
 
     /// <summary>Gets or sets the <see cref="IListDataSource"/> backing this <see cref="ListView"/>, enabling custom rendering.</summary>
     /// <value>The source.</value>
-    /// <remarks>Use <see cref="SetSource"/> to set a new <see cref="IList"/> source.</remarks>
+    /// <remarks>Use <see cref="SetSource{T}"/> to set a new <see cref="IList"/> source.</remarks>
     public IListDataSource Source
     {
         get => _source;
@@ -339,9 +339,9 @@ public class ListView : View, IDesignable
                 _source.CollectionChanged += Source_CollectionChanged;
             }
 
+            SetContentSize (new Size (_source?.Length ?? Viewport.Width, _source?.Count ?? Viewport.Width));
             if (IsInitialized)
             {
-                SetContentSize (new Size (_source?.Length ?? Viewport.Width, _source?.Count ?? Viewport.Width));
                 Viewport = Viewport with { Y = 0 };
             }
 

+ 1 - 1
Terminal.Gui/Views/TileView.cs

@@ -275,7 +275,7 @@ public class TileView : View
             }
         }
 
-        return true;
+        return false;
     }
 
     //// BUGBUG: Why is this not handled by a key binding???