Skip to content

Commit b0c020b

Browse files
committed
call Activate to set the form to the top. Drag and drop seems to leave focus on where ever the file is being dragged from that can cause dialogs to be blocked
1 parent b896adf commit b0c020b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

DoomLauncher/Forms/MainForm.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,7 @@ private void UpdateLocalTabData(ITabView tab)
13991399
private async Task HandleAddGameFiles(AddFileType type, string[] files,
14001400
ITagData tag = null, FileManagement? overrideManagement = null, bool? overridePullTitlepic = null)
14011401
{
1402+
Activate();
14021403
if (!VerifyAddFiles(type, files))
14031404
return;
14041405

@@ -1576,17 +1577,14 @@ private FileAddResults UnmanagedAddCheck(string[] fileNames, string directory)
15761577
private FileManagement GetUserSelectedFileManagement()
15771578
{
15781579
FileManagement fileManagement = AppConfiguration.FileManagement;
1579-
15801580
if (fileManagement == FileManagement.Prompt)
15811581
{
1582-
FileManagementSelect select = new FileManagementSelect
1583-
{
1584-
StartPosition = FormStartPosition.CenterParent
1585-
};
1582+
Activate();
1583+
FileManagementSelect select = new FileManagementSelect();
1584+
select.StartPosition = FormStartPosition.CenterParent;
15861585
select.ShowDialog(this);
15871586
fileManagement = select.GetSelectedFileManagement();
15881587
}
1589-
15901588
return fileManagement;
15911589
}
15921590

@@ -1858,8 +1856,7 @@ private async void ctrlView_DragDrop(object sender, DragEventArgs e)
18581856
{
18591857
ITagData tag = null;
18601858
if (m_tabHandler.TabViewForControl(ctrl) is TagTabView tagTabView)
1861-
tag = tagTabView.TagDataSource;
1862-
1859+
tag = tagTabView.TagDataSource;
18631860
if (ctrl.DoomLauncherParent != null && ctrl.DoomLauncherParent is IWadTabViewCtrl)
18641861
await HandleAddGameFiles(AddFileType.IWad, files);
18651862
else

0 commit comments

Comments
 (0)