diff options
author | Julien de Kozak <jdekozak@hotmail.com> | 2014-12-09 08:00:25 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-18 10:49:12 -0500 |
commit | 2c8a769aaef7465f170edf37982733fd19d89c0e (patch) | |
tree | a2b777a71fd88dded9858a6f28e8d85f16764cea /gtk2_ardour/tempo_dialog.cc | |
parent | d2e966aac458efca03972f1f76a938dd244d18dd (diff) |
Fix crash if new tempo is set to start at bar #0 / Follow-up for non movable meters
Diffstat (limited to 'gtk2_ardour/tempo_dialog.cc')
-rw-r--r-- | gtk2_ardour/tempo_dialog.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index 95d086478a..e13dc059cf 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -359,18 +359,14 @@ MeterDialog::init (const Timecode::BBT_Time& when, double bpb, double divisor, b table->attach (*note_label, 0, 1, 1, 2, FILL|EXPAND, FILL|EXPAND); table->attach (note_type, 1, 2, 1, 2, FILL|EXPAND, SHRINK); - if (movable) { - char buf[64]; - - snprintf (buf, sizeof (buf), "%" PRIu32, when.bars); - when_bar_entry.set_text (buf); + snprintf (buf, sizeof (buf), "%" PRIu32, when.bars); + when_bar_entry.set_text (buf); + if (movable) { Label* when_label = manage (new Label(_("Meter begins at bar:"), ALIGN_LEFT, ALIGN_CENTER)); table->attach (*when_label, 0, 1, 2, 3, FILL | EXPAND, FILL | EXPAND); table->attach (when_bar_entry, 1, 2, 2, 3, FILL | EXPAND, FILL | EXPAND); - } else { - when_bar_entry.set_text ("0"); } get_vbox()->set_border_width (12); |