1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-24 01:09:23 +01:00

fixed tooltips removing themselves from a nonexistant system if an element gets removed

This commit is contained in:
Ellpeck 2019-09-15 02:21:42 +02:00
parent b0aab6fe60
commit e7c7a5bbc2
2 changed files with 5 additions and 2 deletions

View file

@ -17,7 +17,10 @@ namespace MLEM.Ui.Elements {
if (elementToHover != null) {
elementToHover.OnMouseEnter += element => element.System.Add(element.GetType().Name + "Tooltip", this).CanSelectContent = false;
elementToHover.OnMouseExit += element => element.System.Remove(element.GetType().Name + "Tooltip");
elementToHover.OnMouseExit += element => {
if (this.System != null)
this.System.Remove(element.GetType().Name + "Tooltip");
};
}
}

View file

@ -10,7 +10,7 @@
<PackageProjectUrl>https://github.com/Ellpeck/MLEM</PackageProjectUrl>
<RepositoryUrl>https://github.com/Ellpeck/MLEM</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Ellpeck/MLEM/blob/master/LICENSE</PackageLicenseUrl>
<Version>1.1.5</Version>
<Version>1.1.6</Version>
</PropertyGroup>
<ItemGroup>