From dd0e105978aa1fe725de990be98b4943a3beef03 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 9 May 2015 22:43:45 +0100 Subject: [PATCH] Search in the right window when using FindWindowById. --- src/wx/kdm_dialog.cc | 2 +- src/wx/key_dialog.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index 3e6301482..8f4f8622d 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -273,7 +273,7 @@ KDMDialog::setup_sensitivity () _edit_screen->Enable (ss); _remove_screen->Enable (ss); - wxButton* ok = dynamic_cast (FindWindowById (wxID_OK)); + wxButton* ok = dynamic_cast (FindWindowById (wxID_OK, this)); if (ok) { ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd); } diff --git a/src/wx/key_dialog.cc b/src/wx/key_dialog.cc index d7c809609..70229c7a9 100644 --- a/src/wx/key_dialog.cc +++ b/src/wx/key_dialog.cc @@ -62,7 +62,7 @@ KeyDialog::key () const void KeyDialog::key_changed () { - wxButton* ok = dynamic_cast (FindWindowById (wxID_OK)); + wxButton* ok = dynamic_cast (FindWindowById (wxID_OK, this)); ok->Enable (_key->GetValue().Length() == 32); } -- 2.30.2