Quellcode durchsuchen

Fixing the potential infinite loops on changing the property.

BDisp vor 4 Jahren
Ursprung
Commit
d24b7ef25c
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      Terminal.Gui/Core/View.cs

+ 4 - 2
Terminal.Gui/Core/View.cs

@@ -1282,8 +1282,10 @@ namespace Terminal.Gui {
 				return colorScheme;
 			}
 			set {
-				colorScheme = value;
-				SetNeedsDisplay ();
+				if (colorScheme != value) {
+					colorScheme = value;
+					SetNeedsDisplay ();
+				}
 			}
 		}