X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Ffilm_name_location_dialog.cc;h=2c9b165d00db2671a046b26151b044a219c86b5c;hp=0cc406d022168b9d430ec7368ae9bd7fac1b41e2;hb=776fa44207f23f2f7a5c92fdf07222dad3229e9a;hpb=d1e9749ca290673639a49d693a8fe5c6557cc2de diff --git a/src/wx/film_name_location_dialog.cc b/src/wx/film_name_location_dialog.cc index 0cc406d02..2c9b165d0 100644 --- a/src/wx/film_name_location_dialog.cc +++ b/src/wx/film_name_location_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -76,8 +76,22 @@ FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title } layout (); + + _name->Bind (wxEVT_TEXT, bind(&FilmNameLocationDialog::setup_sensitivity, this)); + setup_sensitivity (); +} + + +void +FilmNameLocationDialog::setup_sensitivity () +{ + wxButton* ok = dynamic_cast(FindWindowById(wxID_OK, this)); + if (ok) { + ok->Enable (!_name->GetValue().IsEmpty()); + } } + void FilmNameLocationDialog::use_template_clicked () {