the return of VST support
[ardour.git] / gtk2_ardour / editor_tempodisplay.cc
index aa7b45f4a986d7732bb403a5b453cc9a1245d42a..5f998ada9fa5a0602c39cb874a790d9b8e5ffb60 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>
 #include <climits>
 
-#include <libgnomecanvasmm/libgnomecanvasmm.h>
+#include <libgnomecanvasmm.h>
 
 #include <pbd/error.h>
 
@@ -49,6 +49,7 @@
 using namespace std;
 using namespace sigc;
 using namespace ARDOUR;
+using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace Editing;
@@ -190,6 +191,9 @@ Editor::draw_measures ()
                }
        }
 
+       double x1, x2, y1, y2;
+       track_canvas.get_scroll_region (x1, y1, x2, y2);
+
        for (i = all_bbt_points->begin(); i != all_bbt_points->end(); ++i) {
 
                TempoMap::BBTPoint& p = (*i);
@@ -219,7 +223,7 @@ Editor::draw_measures ()
                                line = get_time_line ();
                                line->property_x1() = xpos;
                                line->property_x2() = xpos;
-                               line->property_y2() = 1000;
+                               line->property_y2() = y2;
                                line->property_color_rgba() = color;
                                line->raise_to_top();
                                line->show();
@@ -344,9 +348,6 @@ Editor::edit_meter_section (MeterSection* section)
        MeterDialog meter_dialog (*section, _("done"));
 
        meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
-       // GTK2FIX
-       // meter_dialog.realize ();
-       // meter_dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
 
        ensure_float (meter_dialog);
 
@@ -375,9 +376,6 @@ Editor::edit_tempo_section (TempoSection* section)
        TempoDialog tempo_dialog (*section, _("done"));
 
        tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
-       // GTK2FIX
-       // tempo_dialog.realize ();
-       // tempo_dialog.get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
 
        ensure_float (tempo_dialog);