Skip to content

Commit 70ebae8

Browse files
committed
Don't make multiple undo history forms.
1 parent 2bb6541 commit 70ebae8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ private void RedoMenuItem_Click(object sender, EventArgs e)
294294

295295
private void ShowUndoHistoryMenuItem_Click(object sender, EventArgs e)
296296
{
297+
if (_undoForm != null && !_undoForm.IsDisposed)
298+
{
299+
// We could just BringToFront, but closing is probably better since the new one will appear in the expected screen location.
300+
_undoForm.Close();
301+
}
302+
297303
_undoForm = new UndoHistoryForm(this) { Owner = this };
298304
_undoForm.Show();
299305
_undoForm.UpdateValues();

0 commit comments

Comments
 (0)