Search in the right window when using FindWindowById.
authorCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 21:43:45 +0000 (22:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 21:43:45 +0000 (22:43 +0100)
src/wx/kdm_dialog.cc
src/wx/key_dialog.cc

index 3e630148268bfee9f7a7807a901eb67f2d0dcc04..8f4f8622df0ca3dd93c43b7e326b2e93d97a4367 100644 (file)
@@ -273,7 +273,7 @@ KDMDialog::setup_sensitivity ()
        _edit_screen->Enable (ss);
        _remove_screen->Enable (ss);
 
-       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
+       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
        if (ok) {
                ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd);
        }
index d7c8096095471e4e505bc29ad3f02ad089cf309b..70229c7a90babaebdb7ca5953db533f7803b9c2a 100644 (file)
@@ -62,7 +62,7 @@ KeyDialog::key () const
 void
 KeyDialog::key_changed ()
 {
-       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
+       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
        ok->Enable (_key->GetValue().Length() == 32);
 }