Fixed build warnings and ensured tests run

This commit is contained in:
Charlie Kindel
2020-10-21 08:49:34 -06:00
parent be7febc604
commit 9c0a8529a6
5 changed files with 7 additions and 7 deletions

View File

@@ -386,7 +386,7 @@ namespace Terminal.Gui {
Application.CurrentView = this;
if (IsCurrentTop || this == Application.Top) {
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
if (!NeedDisplay.IsEmpty) {
Driver.SetAttribute (Colors.TopLevel.Normal);
// This is the Application.Top. Clear just the region we're being asked to redraw

View File

@@ -672,7 +672,7 @@ namespace Terminal.Gui {
/// <param name="region">The view-relative region that must be flagged for repaint.</param>
public void SetNeedsDisplay (Rect region)
{
if (NeedDisplay == null || NeedDisplay.IsEmpty)
if (NeedDisplay.IsEmpty)
NeedDisplay = region;
else {
var x = Math.Min (NeedDisplay.X, region.X);
@@ -1290,7 +1290,7 @@ namespace Terminal.Gui {
if (subviews != null) {
foreach (var view in subviews) {
if (view.NeedDisplay != null && (!view.NeedDisplay.IsEmpty || view.childNeedsDisplay)) {
if (!view.NeedDisplay.IsEmpty || view.childNeedsDisplay) {
if (view.Frame.IntersectsWith (clipRect) && (view.Frame.IntersectsWith (bounds) || bounds.X < 0 || bounds.Y < 0)) {
if (view.layoutNeeded)
view.LayoutSubviews ();

View File

@@ -173,7 +173,7 @@ namespace Terminal.Gui {
var scrRect = ViewToScreen (new Rect (0, 0, Frame.Width, Frame.Height));
// BUGBUG: Why do we draw the frame twice? This call is here to clear the content area, I think. Why not just clear that area?
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
if (!NeedDisplay.IsEmpty) {
Driver.SetAttribute (ColorScheme.Normal);
Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: true);
}

View File

@@ -150,7 +150,7 @@ namespace Terminal.Gui {
Application.CurrentView = this;
var scrRect = ViewToScreen (new Rect (0, 0, Frame.Width, Frame.Height));
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
if (!NeedDisplay.IsEmpty) {
Driver.SetAttribute (ColorScheme.Normal);
Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: true);
}

View File

@@ -14,10 +14,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>