aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/AppendGameDialog.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-28 18:51:47 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-28 18:51:47 +0100
commita8c59c41bc103f0336d9982369be5dd85ac68111 (patch)
treefb6bfea03fe6b000fc7f3c4a0421388cd6a13d57 /src/base_tab/AppendGameDialog.cpp
parent8f1e8fa106107c61c7ac62fa0f13340537ba4d23 (diff)
Fix majors memory leaks (TODO: shared_ptr for Game objects and implement ~Game())
Diffstat (limited to 'src/base_tab/AppendGameDialog.cpp')
-rw-r--r--src/base_tab/AppendGameDialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp
index d8fe996..a4ac126 100644
--- a/src/base_tab/AppendGameDialog.cpp
+++ b/src/base_tab/AppendGameDialog.cpp
@@ -17,8 +17,11 @@ AppendGameDialog::AppendGameDialog(wxWindow *parent, GameBase *base)
ID_DIALOG_CANCEL_BUTTON);
Bind(wxEVT_BUTTON, &AppendGameDialog::OnImport, this,
ID_DIALOG_IMPORT_BUTTON);
+ Bind(wxEVT_CLOSE_WINDOW, &AppendGameDialog::OnClose, this);
}
+void AppendGameDialog::OnClose(wxCloseEvent &e) { Destroy(); }
+
void AppendGameDialog::OnCancel(wxCommandEvent &event) { this->Close(); }
void AppendGameDialog::OnImport(wxCommandEvent &event) {