prepare GUI notifications for plugin scan
[ardour.git] / gtk2_ardour / audio_clock.cc
index 6680e95b1514cfce5113e0c1ac705064137b2066..7bbc00c2678b6c2e8ee68b7c715d9a89eabe3548 100644 (file)
@@ -620,6 +620,9 @@ AudioClock::end_edit (bool modify)
                        break;
 
                case Frames:
+                       if (edit_string.length() < 1) {
+                               edit_string = pre_edit_string;
+                       }
                        break;
                }
 
@@ -1128,7 +1131,7 @@ AudioClock::set_minsec (framepos_t when, bool /*force*/)
        mins = (int) floor (left / (_session->frame_rate() * 60.0f));
        left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
        secs = (int) floor (left / (float) _session->frame_rate());
-       left -= (framecnt_t) floor (secs * _session->frame_rate());
+       left -= (framecnt_t) floor ((double)(secs * _session->frame_rate()));
        millisecs = floor (left * 1000.0 / (float) _session->frame_rate());
 
        if (negative) {
@@ -1739,7 +1742,7 @@ AudioClock::on_motion_notify_event (GdkEventMotion *ev)
 
        drag_y = ev->y;
 
-       if (trunc (drag_accum) != 0) {
+       if (floor (drag_accum) != 0) {
 
                framepos_t frames;
                framepos_t pos;