Skip to content

Commit

Permalink
Make sure that saving saves all items, despite being filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikux3 committed Mar 5, 2020
1 parent 79aae66 commit 922f917
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenKh.Tools.ObjentryEditor/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ public bool OpenFile(string fileName) => File.OpenRead(fileName).Using(stream =>

public void SaveFile(string previousFileName, string fileName)
{
var search = Objentry.SearchTerm;
Objentry.SearchTerm = string.Empty;

using (var f = File.Create(fileName))
Kh2.Objentry.Write(f, Objentry.AsObjEntries());

Objentry.SearchTerm = search;
}
}
}

0 comments on commit 922f917

Please sign in to comment.