Set the object model, data format, and accessor to last used values when saving

This commit is contained in:
Michael Becker 2019-11-16 23:57:45 -05:00
parent 47b1e2ffc8
commit b6f6865e7a
No known key found for this signature in database
GPG Key ID: 389DFF5D73781A12
2 changed files with 8 additions and 0 deletions

View File

@ -66,6 +66,10 @@ namespace UniversalEditor.UserInterface.Dialogs
break;
}
}
this.txtObjectModel.Text = ObjectModel?.MakeReference().Title;
this.txtDataFormat.Text = DataFormat?.MakeReference().Title;
this.txtAccessor.Text = Accessor?.GetFileName();
}
public DocumentPropertiesDialogMode Mode { get; set; } = DocumentPropertiesDialogMode.Open;

View File

@ -836,6 +836,10 @@ namespace UniversalEditor.UserInterface
using (DocumentPropertiesDialog dlg = new DocumentPropertiesDialog ())
{
dlg.Mode = DocumentPropertiesDialogMode.Save;
dlg.ObjectModel = GetCurrentEditorPage().Document.ObjectModel;
dlg.DataFormat = GetCurrentEditorPage().Document.DataFormat;
dlg.Accessor = GetCurrentEditorPage().Document.Accessor;
if (dlg.ShowDialog () == DialogResult.OK)
{
DataFormat df = dlg.DataFormat;