Choose some non-overlapping defaults for User Interaction modifier keys.
[ardour.git] / gtk2_ardour / editor_tempodisplay.cc
index ba73a01f0bd09e43357febe8f8cbccea5fa09c85..9c562a4d8697faf8026c14fd04c5c12c8ecf45fb 100644 (file)
@@ -51,7 +51,7 @@
 #include "tempo_lines.h"
 #include "ui_config.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -279,7 +279,7 @@ Editor::compute_current_bbt_points (std::vector<TempoMap::BBTPoint>& grid, frame
 
        /* prevent negative values of leftmost from creeping into tempomap
         */
-       const double lower_beat = floor (_session->tempo_map().beat_at_frame (leftmost)) - 1.0;
+       const double lower_beat = floor (max (0.0, _session->tempo_map().beat_at_frame (leftmost))) - 1.0;
        _session->tempo_map().get_grid (grid, max (_session->tempo_map().frame_at_beat (lower_beat), (framepos_t) 0), rightmost);
 }