From 7d5a624ff54cb4f9d2fc200340cffabe39fcd0ce Mon Sep 17 00:00:00 2001 From: alcexhim Date: Thu, 18 Dec 2014 15:22:03 -0500 Subject: [PATCH] Do not auto-close the popup dialog so it doesn't close when the CustomOptionsDialog is activated --- .../Dialogs/DocumentPropertiesDialog.cs | 6 +++++- .../Dialogs/GenericBrowserPopup.cs | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs index 24412dae..b4b7bc38 100644 --- a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs +++ b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs @@ -178,6 +178,7 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs { GenericBrowserPopup dlg = (sender as GenericBrowserPopup); 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) diff --git a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/GenericBrowserPopup.cs b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/GenericBrowserPopup.cs index 2685234b..9441a507 100644 --- a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/GenericBrowserPopup.cs +++ b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/GenericBrowserPopup.cs @@ -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 mvarAvailableObjects = new System.Collections.ObjectModel.Collection();