Round image line sizes up to 32. Seems to help with LHS image corruption with both...
[dcpomatic.git] / src / wx / gain_calculator_dialog.cc
index 431a4672d9c70c790cca332f14a63e143ad0a02f..3f07faf062e4239835d692f8466d30c438fb7822 100644 (file)
@@ -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<float> (wx_to_std (_wanted->GetValue ()));
 }
 
 float
 GainCalculatorDialog::actual_fader () const
 {
+       if (_actual->GetValue().IsEmpty()) {
+               return 0;
+       }
+
        return lexical_cast<float> (wx_to_std (_actual->GetValue ()));
 }