mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 15:24:10 +02:00
Fixed some file/dir deleting issues
This commit is contained in:
parent
9a2d200b70
commit
387ba470d4
5 changed files with 46 additions and 11 deletions
|
@ -842,6 +842,7 @@ namespace IDE.ui
|
|||
{
|
||||
mEditData.mLastFileTextVersion = mEditWidget.Content.mData.mCurTextVersionId;
|
||||
mEditData.mHadRefusedFileChange = false;
|
||||
mEditData.mFileDeleted = false;
|
||||
|
||||
var editText = scope String();
|
||||
mEditWidget.GetText(editText);
|
||||
|
@ -2120,16 +2121,29 @@ namespace IDE.ui
|
|||
mEditData.Ref();
|
||||
mProjectSource.mEditData = mEditData;
|
||||
mEditData.mProjectSources.Add(mProjectSource);
|
||||
// Rehup mFileDeleted if necessary
|
||||
if (mEditData.mFileDeleted)
|
||||
mEditData.IsFileDeleted();
|
||||
}
|
||||
}
|
||||
QueueFullRefresh(true);
|
||||
}
|
||||
|
||||
public void DetachFromProjectItem()
|
||||
public void DetachFromProjectItem(bool fileDeleted)
|
||||
{
|
||||
if (mProjectSource == null)
|
||||
return;
|
||||
|
||||
if (fileDeleted)
|
||||
{
|
||||
// We manually add this change record because it may not get caught since the watch dep may be gone
|
||||
// This will allow the "File Deleted" dialog to show.
|
||||
var changeRecord = new FileWatcher.ChangeRecord();
|
||||
changeRecord.mChangeType = .Deleted;
|
||||
changeRecord.mPath = new String(mFilePath);
|
||||
gApp.mFileWatcher.AddChangedFile(changeRecord);
|
||||
}
|
||||
|
||||
ProcessDeferredResolveResults(-1);
|
||||
|
||||
//Debug.Assert(mEditData != null);
|
||||
|
@ -2140,9 +2154,9 @@ namespace IDE.ui
|
|||
QueueFullRefresh(true);
|
||||
|
||||
if (mOldVersionPanel != null)
|
||||
mOldVersionPanel.DetachFromProjectItem();
|
||||
mOldVersionPanel.DetachFromProjectItem(false);
|
||||
if (mSplitTopPanel != null)
|
||||
mSplitTopPanel.DetachFromProjectItem();
|
||||
mSplitTopPanel.DetachFromProjectItem(false);
|
||||
}
|
||||
|
||||
public void CloseEdit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue