projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More stack-allocated Dialog objects.
[dcpomatic.git]
/
src
/
wx
/
audio_panel.cc
diff --git
a/src/wx/audio_panel.cc
b/src/wx/audio_panel.cc
index 81a445efbce029fa7bf51842bf0ac9eba3d4c8f5..9a90436696485f65a32aa32e4632ce0b099120ed 100644
(file)
--- a/
src/wx/audio_panel.cc
+++ b/
src/wx/audio_panel.cc
@@
-304,18
+304,17
@@
AudioPanel::film_content_changed (int property)
void
AudioPanel::gain_calculate_button_clicked ()
{
void
AudioPanel::gain_calculate_button_clicked ()
{
-
auto d = new GainCalculatorDialog
(this);
- auto const r = d
->ShowModal
();
- auto c
= d->
db_change();
+
GainCalculatorDialog dialog
(this);
+ auto const r = d
ialog.ShowModal
();
+ auto c
hange = dialog.
db_change();
- if (r == wxID_CANCEL || !c) {
- d->Destroy ();
+ if (r == wxID_CANCEL || !change) {
return;
}
auto old_peak_dB = peak ();
auto old_value = _gain->wrapped()->GetValue();
return;
}
auto old_peak_dB = peak ();
auto old_value = _gain->wrapped()->GetValue();
- _gain->wrapped()->SetValue(old_value + *c);
+ _gain->wrapped()->SetValue(old_value + *c
hange
);
/* This appears to be necessary, as the change is not signalled,
I think.
/* This appears to be necessary, as the change is not signalled,
I think.
@@
-328,8
+327,6
@@
AudioPanel::gain_calculate_button_clicked ()
_gain->wrapped()->SetValue (old_value);
_gain->view_changed ();
}
_gain->wrapped()->SetValue (old_value);
_gain->view_changed ();
}
-
- d->Destroy ();
}
}