diff --git a/Terminal.Gui/Core/Toplevel.cs b/Terminal.Gui/Core/Toplevel.cs
index 213b86f9c..9f0f135e6 100644
--- a/Terminal.Gui/Core/Toplevel.cs
+++ b/Terminal.Gui/Core/Toplevel.cs
@@ -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
diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs
index 617a7b7d9..4cd2b466f 100644
--- a/Terminal.Gui/Core/View.cs
+++ b/Terminal.Gui/Core/View.cs
@@ -672,7 +672,7 @@ namespace Terminal.Gui {
/// The view-relative region that must be flagged for repaint.
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 ();
diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs
index d6592c31d..a2113e8e2 100644
--- a/Terminal.Gui/Core/Window.cs
+++ b/Terminal.Gui/Core/Window.cs
@@ -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);
}
diff --git a/Terminal.Gui/Views/FrameView.cs b/Terminal.Gui/Views/FrameView.cs
index 9b2a53783..947631eb6 100644
--- a/Terminal.Gui/Views/FrameView.cs
+++ b/Terminal.Gui/Views/FrameView.cs
@@ -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);
}
diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj
index 0faffbac4..2b0e7a8af 100644
--- a/UnitTests/UnitTests.csproj
+++ b/UnitTests/UnitTests.csproj
@@ -14,10 +14,10 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive