1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-12 21:34:11 +02:00

Fixed issue detaching editdata when resetting ui

This commit is contained in:
Brian Fiete 2021-12-15 16:24:30 -05:00
parent ae186433cc
commit a2a97a8e5f
2 changed files with 11 additions and 1 deletions

View file

@ -355,7 +355,7 @@ namespace IDE
return .SimpleSource; return .SimpleSource;
} }
public override void Dispose() public void ClearEditData()
{ {
if (mEditData != null) if (mEditData != null)
{ {
@ -365,6 +365,11 @@ namespace IDE
} }
} }
public override void Dispose()
{
ClearEditData();
}
public override void Detach() public override void Detach()
{ {
Dispose(); Dispose();

View file

@ -546,6 +546,11 @@ namespace IDE.ui
public ~this() public ~this()
{ {
if (mProjectSource?.mEditData?.HasTextChanged() == true)
{
mProjectSource.ClearEditData();
}
if (mInPostRemoveUpdatePanels) if (mInPostRemoveUpdatePanels)
{ {
//Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} in ~this ", this); //Debug.WriteLine("Removing sourceViewPanel from mPostRemoveUpdatePanel {0} in ~this ", this);