1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Improved PostRemoveUpdate to avoid pauses on closing tabs

This commit is contained in:
Brian Fiete 2022-05-07 16:23:30 -07:00
parent bbd058eeaf
commit 34cfe89d3a
2 changed files with 12 additions and 1 deletions

View file

@ -6914,7 +6914,15 @@ namespace IDE
int recentFileIdx = -1;
if (sourceViewPanel != null)
{
sourceViewPanel.Dispose();
if (sourceViewPanel.[Friend]NeedsPostRemoveUpdate)
{
sourceViewPanel.[Friend]mDeleteAfterPostRemoveUpdate = true;
tabButton.mContent.RemoveSelf();
tabButton.mContent = null;
}
else
sourceViewPanel.Dispose();
if (sourceViewPanel.mFilePath != null)
recentFileIdx = GetRecentFilesIdx(sourceViewPanel.mFilePath);
}
@ -14167,6 +14175,8 @@ namespace IDE
//Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} from IDEApp.Update", sourceViewPanel);
sourceViewPanel.[Friend]mInPostRemoveUpdatePanels = false;
@sourceViewPanel.Remove();
if (sourceViewPanel.[Friend]mDeleteAfterPostRemoveUpdate)
DeferDelete(sourceViewPanel);
}
}