visibility macros and flush() added to SrcFileSource; merge with master
[ardour.git] / gtk2_ardour / editor_tempodisplay.cc
index 09d9b39c735dcf80d4ad93387ab69aaf30950552..b997d3bb5d94714ece8beb2b89007162f5c4880a 100644 (file)
@@ -162,8 +162,9 @@ Editor::compute_current_bbt_points (framepos_t leftmost, framepos_t rightmost,
 void
 Editor::hide_measures ()
 {
-       if (tempo_lines)
+       if (tempo_lines) {
                tempo_lines->hide();
+       }
 }
 
 void
@@ -175,7 +176,7 @@ Editor::draw_measures (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
        }
 
        if (tempo_lines == 0) {
-               tempo_lines = new TempoLines (*_track_canvas, time_line_group, physical_screen_height(get_window()));
+               tempo_lines = new TempoLines (*_track_canvas, time_line_group, ArdourCanvas::COORD_MAX);
        }
        
        tempo_lines->draw (begin, end, samples_per_pixel);
@@ -191,7 +192,6 @@ Editor::mouse_add_new_tempo_event (framepos_t frame)
        TempoMap& map(_session->tempo_map());
        TempoDialog tempo_dialog (map, frame, _("add"));
 
-       tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
        //this causes compiz to display no border.
        //tempo_dialog.signal_realize().connect (sigc::bind (sigc::ptr_fun (set_decoration), &tempo_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
 
@@ -234,8 +234,6 @@ Editor::mouse_add_new_meter_event (framepos_t frame)
        TempoMap& map(_session->tempo_map());
        MeterDialog meter_dialog (map, frame, _("add"));
 
-       meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
-
        //this causes compiz to display no border..
        //meter_dialog.signal_realize().connect (sigc::bind (sigc::ptr_fun (set_decoration), &meter_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
 
@@ -291,8 +289,6 @@ Editor::edit_meter_section (MeterSection* section)
 {
        MeterDialog meter_dialog (*section, _("done"));
 
-       meter_dialog.set_position (Gtk::WIN_POS_MOUSE);
-
        ensure_float (meter_dialog);
 
        switch (meter_dialog.run()) {
@@ -323,8 +319,6 @@ Editor::edit_tempo_section (TempoSection* section)
 {
        TempoDialog tempo_dialog (*section, _("done"));
 
-       tempo_dialog.set_position (Gtk::WIN_POS_MOUSE);
-
        ensure_float (tempo_dialog);
 
        switch (tempo_dialog.run ()) {