reset accessor position when trying next DataFormat

This commit is contained in:
Michael Becker 2020-06-17 18:31:49 -04:00
parent afcdf67668
commit 948f4c7796
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -437,6 +437,9 @@ namespace UniversalEditor.UserInterface
{
if (doc == null) return;
long initpos = 0;
bool first = true;
bool loaded = false;
if (doc.DataFormat == null)
{
@ -463,7 +466,17 @@ namespace UniversalEditor.UserInterface
try
{
doc.Accessor.Open ();
doc.Accessor.Open();
if (first)
{
initpos = doc.Accessor.Position;
first = false;
}
else
{
doc.Accessor.Position = initpos;
}
doc.Load ();
doc.IsSaved = true;
loaded = true;