fixed OnTabClose

This commit is contained in:
MountainFlash 2021-10-18 10:52:01 +05:30
parent 24a7efccf4
commit 41a0cf0950
No known key found for this signature in database
GPG Key ID: 6BDA200334E04E1A

View File

@ -24,7 +24,7 @@ namespace FModel.Views.Resources.Controls
private readonly Regex _hexColorRegex = new("\"Hex\": \"(?'target'[0-9A-Fa-f]{3,8})\"$",
RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
private readonly System.Windows.Controls.ToolTip _toolTip = new();
private Dictionary<string, NavigationList<int>> _savedCarets= new();
private readonly Dictionary<string, NavigationList<int>> _savedCarets = new();
private NavigationList<int> _caretsOffsets
{
get
@ -223,7 +223,7 @@ namespace FModel.Views.Resources.Controls
private void OnTabClose(object sender, EventArgs eventArgs)
{
if (sender is not TabItem tab|| eventArgs is not TabControlViewModel.TabEventArgs e)
if (sender is not TabControlViewModel tab|| eventArgs is not TabControlViewModel.TabEventArgs e)
return;
var fileName = e.TabToRemove.Document.FileName;
if (_savedCarets.ContainsKey(fileName))