fix unused variable warnings and code tidy
[ardour.git] / gtk2_ardour / tempo_curve.cc
index b8fb661919b2b450bbcfe6bd2647ad4ae927c25d..db675c9c5f710116c00aed5e2594a2d6299a34e6 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <gtkmm2ext/utils.h>
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 PBD::Signal1<void,TempoCurve*> TempoCurve::CatchDeletion;
 
@@ -128,7 +128,7 @@ TempoCurve::set_position (framepos_t frame, framepos_t end_frame)
                points->push_back (ArdourCanvas::Duple (ArdourCanvas::COORD_MAX - 5.0, y_pos));
 
        } else {
-               const framepos_t frame_step = (end_frame - frame) / 5;
+               const framepos_t frame_step = max ((end_frame - frame) / 5, (framepos_t) 1);
                framepos_t current_frame = frame;
 
                while (current_frame < (end_frame - frame_step)) {
@@ -175,7 +175,7 @@ void
 TempoCurve::set_color_rgba (uint32_t c)
 {
        _color = c;
-       _curve->set_fill_color (UIConfiguration::instance().color_mod ("color 62", "selection rect"));
+       _curve->set_fill_color (UIConfiguration::instance().color_mod ("tempo curve", "selection rect"));
        _curve->set_outline_color (_color);
 
 }