Do not auto-close the popup dialog so it doesn't close when the CustomOptionsDialog is activated

This commit is contained in:
Michael Becker 2014-12-18 15:22:03 -05:00
parent fc5fa07d22
commit 7d5a624ff5
2 changed files with 9 additions and 2 deletions

View File

@ -178,6 +178,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
{
GenericBrowserPopup<Accessor, AccessorReference> dlg = (sender as GenericBrowserPopup<Accessor, AccessorReference>);
mvarAccessor = dlg.SelectedObject;
dlg.AutoClose = false;
switch (mvarMode)
{
@ -200,6 +201,8 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
}
RefreshButtons();
dlg.AutoClose = true;
}
private void cmdAccessor_Click(object sender, EventArgs e)
@ -259,8 +262,9 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
{
if (mvarAccessor is FileAccessor)
{
DataFormatReference[] dfrs = UniversalEditor.Common.Reflection.GetAvailableDataFormats(mvarAccessor);
Association[] assocs = Association.FromCriteria(new AssociationCriteria() { Accessor = mvarAccessor });
DataFormatReference[] dfrs = null;
if (mvarDataFormat == null)
{
if (dfrs.Length > 0)

View File

@ -19,10 +19,13 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs
Font = SystemFonts.MenuFont;
}
private bool mvarAutoClose = true;
public bool AutoClose { get { return mvarAutoClose; } set { mvarAutoClose = value; } }
protected override void OnDeactivate(EventArgs e)
{
base.OnDeactivate(e);
this.Close();
if (mvarAutoClose) this.Close();
}
private System.Collections.ObjectModel.Collection<TRef> mvarAvailableObjects = new System.Collections.ObjectModel.Collection<TRef>();