mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
fixed OnTabClose
This commit is contained in:
parent
24a7efccf4
commit
41a0cf0950
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user