X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fgain_calculator_dialog.cc;h=3f07faf062e4239835d692f8466d30c438fb7822;hb=129afab72bfc026b5704c41a6bfc0f4b3a2c4033;hp=431a4672d9c70c790cca332f14a63e143ad0a02f;hpb=5f720d7854043ebe479ac6664595e016c3a1610b;p=dcpomatic.git diff --git a/src/wx/gain_calculator_dialog.cc b/src/wx/gain_calculator_dialog.cc index 431a4672d..3f07faf06 100644 --- a/src/wx/gain_calculator_dialog.cc +++ b/src/wx/gain_calculator_dialog.cc @@ -38,7 +38,7 @@ GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent) table->Add (_actual, 1, wxEXPAND); wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL); - overall_sizer->Add (table, 1, wxEXPAND); + overall_sizer->Add (table, 1, wxEXPAND | wxALL, 6); wxSizer* buttons = CreateSeparatedButtonSizer (wxOK); if (buttons) { @@ -52,11 +52,19 @@ GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent) float GainCalculatorDialog::wanted_fader () const { + if (_wanted->GetValue().IsEmpty()) { + return 0; + } + return lexical_cast (wx_to_std (_wanted->GetValue ())); } float GainCalculatorDialog::actual_fader () const { + if (_actual->GetValue().IsEmpty()) { + return 0; + } + return lexical_cast (wx_to_std (_actual->GetValue ())); }