Apply fader-based gain calculations to the current gain, not 0dB.
[dcpomatic.git] / src / wx / audio_panel.cc
index 183a3d4b9817ca8cfe89425e583eb69966f2cbcc..5523d25393088196d88655581121b43f740c6522 100644 (file)
@@ -258,7 +258,7 @@ AudioPanel::gain_calculate_button_clicked ()
                return;
        }
 
-       _gain->wrapped()->SetValue (*c);
+       _gain->wrapped()->SetValue(_gain->wrapped()->GetValue() + *c);
 
        /* This appears to be necessary, as the change is not signalled,
           I think.
@@ -316,7 +316,13 @@ AudioPanel::setup_sensitivity ()
 
        string why_not;
        bool const can_reference = dcp && dcp->can_reference_audio (_parent->film(), why_not);
-       setup_refer_button (_reference, _reference_note, dcp, can_reference, why_not);
+       wxString cannot;
+       if (why_not.empty()) {
+               cannot = _("Cannot reference this DCP's audio.");
+       } else {
+               cannot = _("Cannot reference this DCP's audio: ") + std_to_wx(why_not);
+       }
+       setup_refer_button (_reference, _reference_note, dcp, can_reference, cannot);
 
        if (_reference->GetValue ()) {
                _gain->wrapped()->Enable (false);