don't request redraw of a Canvas item if it marked invisible
[ardour.git] / gtk2_ardour / editor.cc
index 7af556416d87fddca28fb0feb8c032f8f21fd90a..5da1d09d8f565c2248608db2e666b1aedb601b63 100644 (file)
@@ -369,6 +369,7 @@ Editor::Editor ()
        location_loop_color = ARDOUR_UI::config()->get_canvasvar_LocationLoop();
        location_punch_color = ARDOUR_UI::config()->get_canvasvar_LocationPunch();
 
+       zoom_focus = ZoomFocusLeft;
        _edit_point = EditAtMouse;
        _internal_editing = false;
        current_canvas_cursor = 0;
@@ -377,8 +378,6 @@ Editor::Editor ()
 
        _scroll_callbacks = 0;
 
-       zoom_focus = ZoomFocusLeft;
-       set_zoom_focus (ZoomFocusLeft);
        zoom_range_clock->ValueChanged.connect (sigc::mem_fun(*this, &Editor::zoom_adjustment_changed));
 
        bbt_label.set_name ("EditorRulerLabel");
@@ -636,6 +635,7 @@ Editor::Editor ()
 
        setup_toolbar ();
 
+       set_zoom_focus (zoom_focus);
        _snap_type = SnapToBeat;
        set_snap_to (_snap_type);
        _snap_mode = SnapOff;
@@ -1260,7 +1260,8 @@ Editor::set_session (Session *t)
 
        /* These signals can all be emitted by a non-GUI thread. Therefore the
           handlers for them must not attempt to directly interact with the GUI,
-          but use Gtkmm2ext::UI::instance()->call_slot();
+          but use PBD::Signal<T>::connect() which accepts an event loop
+          ("context") where the handler will be asked to run.
        */
 
        _session->StepEditStatusChange.connect (_session_connections, invalidator (*this), boost::bind (&Editor::step_edit_status_change, this, _1), gui_context());
@@ -1912,6 +1913,9 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
        edit_items.push_back (MenuElem (_("Bounce Range to Region List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false)));
        edit_items.push_back (MenuElem (_("Bounce Range to Region List With Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true)));
        edit_items.push_back (MenuElem (_("Export Range..."), sigc::mem_fun(*this, &Editor::export_selection)));
+       if (ARDOUR_UI::instance()->video_timeline->get_duration() > 0) {
+               edit_items.push_back (MenuElem (_("Export Video Range..."), sigc::bind (sigc::mem_fun(*this, &Editor::export_video), true)));
+       }
 }