Prevent FileDialogs.OpenFileDialog from blocking test automation

- Use RunOnIdle as expected
- Issue MatterHackers/MCCentral#3121
Investigate DragTo3DViewAddsItem failure
This commit is contained in:
John Lewin 2018-04-13 15:05:54 -07:00
parent ea88635352
commit 11a68c1457
2 changed files with 4 additions and 3 deletions

View file

@ -456,7 +456,9 @@ namespace MatterHackers.MatterControl.PrintLibrary
ToolTipText = "Add an.stl, .obj, .amf, .gcode or.zip file to the Library".Localize(),
Action = (selectedLibraryItems, listView) =>
{
AggContext.FileDialogs.OpenFileDialog(
UiThread.RunOnIdle(() =>
{
AggContext.FileDialogs.OpenFileDialog(
new OpenFileDialogParams(ApplicationSettings.OpenPrintableFileParams, multiSelect: true),
(openParams) =>
{
@ -470,6 +472,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
}
}
});
});
},
IsEnabled = (s, l) => this.libraryView.ActiveContainer is ILibraryWritableContainer
});