diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-01-01 17:06:15 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-01-01 17:06:15 +0000 |
commit | ed1684dce503c9732a94f8e743f4090c14878522 (patch) | |
tree | a9e8ad974b3ef9ffa6cbeb95f6e85b53092329c7 /gtk2_ardour/ardour_ui2.cc | |
parent | 8073c4da5e099091c73a85900d5ed701d59807d9 (diff) |
fix segv
git-svn-id: svn://localhost/trunk/ardour2@221 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index bad43840c7..0e6168ef91 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -534,7 +534,7 @@ ARDOUR_UI::manage_window (Window& win) void ARDOUR_UI::detach_tearoff (Box* b, Widget* w) { - editor->ensure_float (*transport_tearoff->tearoff_window()); + editor->ensure_float (transport_tearoff->tearoff_window()); b->remove (*w); } @@ -835,26 +835,34 @@ void ARDOUR_UI::update_speed_display () { if (!session) { - speed_display_label.set_text (_("stopped")); + if (last_speed_displayed != 0) { + speed_display_label.set_text (_("stopped")); + last_speed_displayed = 0; + } return; } char buf[32]; float x = session->transport_speed (); - if (x != 0) { - if (shuttle_units == Percentage) { - snprintf (buf, sizeof (buf), "%.4f", x); - } else { - if (x < 0) { - snprintf (buf, sizeof (buf), "< %.1f", 12.0 * fast_log2 (-x)); + if (x != last_speed_displayed) { + + if (x != 0) { + if (shuttle_units == Percentage) { + snprintf (buf, sizeof (buf), "%.4f", x); } else { - snprintf (buf, sizeof (buf), "> %.1f", 12.0 * fast_log2 (x)); + if (x < 0) { + snprintf (buf, sizeof (buf), "< %.1f", 12.0 * fast_log2 (-x)); + } else { + snprintf (buf, sizeof (buf), "> %.1f", 12.0 * fast_log2 (x)); + } } + speed_display_label.set_text (buf); + } else { + speed_display_label.set_text (_("stopped")); } - speed_display_label.set_text (buf); - } else { - speed_display_label.set_text (_("stopped")); + + last_speed_displayed = x; } } |