Skip to content

Commit 3f36706

Browse files
committed
Don't make multiple undo history forms.
1 parent ec21b58 commit 3f36706

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
@@ -306,6 +306,12 @@ private void RedoMenuItem_Click(object sender, EventArgs e)
306306

307307
private void ShowUndoHistoryMenuItem_Click(object sender, EventArgs e)
308308
{
309+
if (_undoForm != null && !_undoForm.IsDisposed)
310+
{
311+
// We could just BringToFront, but closing is probably better since the new one will appear in the expected screen location.
312+
_undoForm.Close();
313+
}
314+
309315
_undoForm = new UndoHistoryForm(this) { Owner = this };
310316
_undoForm.Show();
311317
_undoForm.UpdateValues();

0 commit comments

Comments
 (0)