Explorar o código

Fixing the potential infinite loops on changing the property.

BDisp %!s(int64=4) %!d(string=hai) anos
pai
achega
d24b7ef25c
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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 ();
+				}
 			}
 		}