horribly inefficent signaling to let us know when a document is changed
This commit is contained in:
parent
5aa2a7518c
commit
a1827a07fc
@ -113,6 +113,8 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
fd.MultiSelect = true;
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BeginEdit();
|
||||
|
||||
foreach (string fileName in fd.SelectedFileNames)
|
||||
{
|
||||
string fileTitle = System.IO.Path.GetFileName(fileName);
|
||||
@ -120,6 +122,8 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
|
||||
UIAddExistingFile(fsom, fileTitle, data);
|
||||
}
|
||||
|
||||
EndEdit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,6 +199,8 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
{
|
||||
Folder f = FolderFromPath(fd.SelectedFileNames[fd.SelectedFileNames.Count - 1]);
|
||||
IFileSystemObject[] files = f.GetContents();
|
||||
|
||||
BeginEdit();
|
||||
foreach (IFileSystemObject fso in files)
|
||||
{
|
||||
if (fso is File)
|
||||
@ -206,6 +212,7 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
RecursiveAddFolder(fso as Folder);
|
||||
}
|
||||
}
|
||||
EndEdit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,20 +222,16 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
if (fsom == null)
|
||||
return;
|
||||
|
||||
if (item != null)
|
||||
BeginEdit();
|
||||
if (item is Folder)
|
||||
{
|
||||
if (item is File)
|
||||
{
|
||||
}
|
||||
else if (item is Folder)
|
||||
{
|
||||
(item as Folder).Folders.Add(f);
|
||||
}
|
||||
(item as Folder).Folders.Add(f);
|
||||
}
|
||||
else
|
||||
else if (item == null)
|
||||
{
|
||||
fsom.Folders.Add(f);
|
||||
}
|
||||
EndEdit();
|
||||
}
|
||||
|
||||
private void FileAddExistingFolder_Click(object sender, EventArgs e)
|
||||
@ -241,9 +244,13 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
fd.Mode = FileDialogMode.SelectFolder;
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BeginEdit();
|
||||
|
||||
Folder f = FolderFromPath(fd.SelectedFileNames[fd.SelectedFileNames.Count - 1]);
|
||||
RecursiveAddFolder(f);
|
||||
AddFolderToItem(f, null);
|
||||
|
||||
EndEdit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,10 @@ namespace UniversalEditor.Editors.Text.Plain
|
||||
private void txt_Changed(object sender, EventArgs e)
|
||||
{
|
||||
PlainTextObjectModel om = (this.ObjectModel as PlainTextObjectModel);
|
||||
|
||||
BeginEdit();
|
||||
om.Text = txt.Text;
|
||||
EndEdit();
|
||||
}
|
||||
|
||||
public PlainTextEditor ()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user