Browse Source

Fixed SD2-784 - File still considered dirty after undoing all changes.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3700 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 17 years ago
parent
commit
83f1a70b35
  1. 6
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  2. 6
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

6
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -545,6 +545,12 @@ namespace ICSharpCode.XmlEditor @@ -545,6 +545,12 @@ namespace ICSharpCode.XmlEditor
public void Undo()
{
xmlEditor.Undo();
/// If all undos are complete and the file is not untitled (i.e. was loaded from the file system) then
/// the file is not dirty.
if (PrimaryFile.IsDirty && !EnableUndo && !PrimaryFile.IsUntitled) {
PrimaryFile.IsDirty = false;
}
}
#endregion

6
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

@ -147,6 +147,12 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -147,6 +147,12 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public void Undo()
{
this.textEditorControl.Undo();
/// If all undos are complete and the file is not untitled (i.e. was loaded from the file system) then
/// the file is not dirty.
if (PrimaryFile.IsDirty && !EnableUndo && !PrimaryFile.IsUntitled) {
PrimaryFile.IsDirty = false;
}
}
public void Redo()

Loading…
Cancel
Save