Fix TopMost appearance for Group Slots viewer

SAV editor gui:
Used by stadium to show registered teams, the form would misbehave when showing hover previews if you change focus between main window and the popup form.
Copy the `form.Owner=ParentForm` behavior from the popup box viewer, which behaves correctly.
This commit is contained in:
Kurt 2024-08-25 10:16:38 -05:00
parent a75bb2c758
commit ba7646e7a2

View file

@ -690,9 +690,14 @@ public partial class SAVEditor : UserControl, ISlotViewer<PictureBox>, ISaveFile
{ {
var form = WinFormsUtil.FirstFormOfType<SAV_GroupViewer>(); var form = WinFormsUtil.FirstFormOfType<SAV_GroupViewer>();
if (form != null) if (form != null)
{
form.CenterToForm(ParentForm); form.CenterToForm(ParentForm);
}
else else
form = new SAV_GroupViewer(sav, M.Env.PKMEditor, g) { TopMost = true }; {
form = new SAV_GroupViewer(sav, M.Env.PKMEditor, g);
form.Owner = ParentForm;
}
form.BringToFront(); form.BringToFront();
form.Show(); form.Show();
} }