From 95917e08d6b9a27727170c63424131a7f6bfaf07 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 2 Jun 2020 13:40:05 +0200 Subject: [PATCH] only mark element parent dirty when setting priority if it actually changed --- MLEM.Ui/Elements/Element.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index b3c8c05..10a7cc1 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -210,6 +210,8 @@ namespace MLEM.Ui.Elements { public int Priority { get => this.priority; set { + if (this.priority == value) + return; this.priority = value; if (this.Parent != null) this.Parent.SetSortedChildrenDirty();