13
0

remove Cue, CD, Scene, Punch, Loop rulers, consolidate to just a pair (ranges, locations)

a menu allows choosing between all markers or 1 specific type, and all ranges or 1 specific type

more work required on menu structure and menu options/dialogs to specify the type of new location
and range marker creation
This commit is contained in:
Paul Davis 2024-05-16 22:58:55 -06:00
parent 9d046af47a
commit 93e1e1c1f2
9 changed files with 325 additions and 311 deletions

View File

@ -548,12 +548,8 @@
<menuitem action="toggle-meter-ruler"/>
<menuitem action="toggle-tempo-ruler"/>
<menuitem action="toggle-range-ruler"/>
<menuitem action="toggle-loop-punch-ruler"/>
<menuitem action="toggle-cd-marker-ruler"/>
<menuitem action="toggle-arrangement-ruler"/>
<menuitem action="toggle-marker-ruler"/>
<menuitem action="toggle-cue-marker-ruler"/>
<menuitem action="toggle-scene-marker-ruler"/>
<separator/>
<menuitem action="toggle-video-ruler"/>
</menu>
@ -802,11 +798,7 @@
<menuitem action="toggle-meter-ruler"/>
<menuitem action="toggle-tempo-ruler"/>
<menuitem action="toggle-range-ruler"/>
<menuitem action="toggle-loop-punch-ruler"/>
<menuitem action="toggle-cd-marker-ruler"/>
<menuitem action="toggle-marker-ruler"/>
<menuitem action="toggle-cue-marker-ruler"/>
<menuitem action="toggle-scene-marker-ruler"/>
<separator/>
<menuitem action="toggle-video-ruler"/>
</popup>
@ -871,6 +863,22 @@
<menuitem action='removeUnusedRegions'/>
</popup>
<popup name='MarkerShowMenu' accelerators='true'>
<menuitem action='show-all-markers'/>
<menuitem action='show-cd-markers'/>
<menuitem action='show-cue-markers'/>
<menuitem action='show-scene-markers'/>
<menuitem action='show-location-markers'/>
</popup>
<popup name='RangeShowMenu' accelerators='true'>
<menuitem action='show-all-ranges'/>
<menuitem action='show-session-range'/>
<menuitem action='show-punch-range'/>
<menuitem action='show-loop-range'/>
<menuitem action='show-other-ranges'/>
</popup>
<popup name='PopupRegionMenu' action='PopupRegionMenu' accelerators='true'>
<menuitem action='play-selected-regions'/>
<menuitem action='tag-selected-regions'/>

View File

@ -246,7 +246,8 @@ ARDOUR_UI::toggle_punch_out ()
void
ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
{
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Rulers"), "toggle-loop-punch-ruler");
/* XXX FIX ME */
Glib::RefPtr<ToggleAction> tact; // = ActionManager::get_toggle_action (X_("Rulers"), "toggle-loop-punch-ruler");
tact->set_sensitive (false);
@ -259,9 +260,10 @@ ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
void
ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
{
/* XXX FIX ME */
if (!_session->config.get_punch_in() && !_session->config.get_punch_out()) {
/* if punch in/out are now both off, reallow hiding of the loop/punch ruler */
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
Glib::RefPtr<Action> act; // = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
if (act) {
act->set_sensitive (true);
}

View File

@ -289,8 +289,6 @@ Editor::Editor ()
, meter_group (0)
, marker_group (0)
, range_marker_group (0)
, transport_marker_group (0)
, cd_marker_group (0)
, section_marker_group (0)
, _time_markers_group (0)
, _selection_marker_group (0)
@ -326,10 +324,7 @@ Editor::Editor ()
, meter_bar (0)
, marker_bar (0)
, range_marker_bar (0)
, transport_marker_bar (0)
, cd_marker_bar (0)
, section_marker_bar (0)
, cue_marker_bar (0)
, ruler_separator (0)
, minsec_label (_("Mins:Secs"))
, bbt_label (_("Bars:Beats"))
@ -339,11 +334,8 @@ Editor::Editor ()
, meter_label (_("Time Signature"))
, mark_label (_("Location Markers"))
, range_mark_label (_("Range Markers"))
, transport_mark_label (_("Loop/Punch Ranges"))
, cd_mark_label (_("CD Markers"))
, section_mark_label (_("Arrangement"))
, cue_mark_label (_("Cue Markers"))
, scene_mark_label (_("Scenes"))
, videotl_label (_("Video Timeline"))
, videotl_group (0)
, _region_boundary_cache_dirty (true)
@ -412,11 +404,7 @@ Editor::Editor ()
, _section_box (0)
, _playhead_cursor (0)
, _snapped_cursor (0)
, cd_marker_bar_drag_rect (0)
, cue_marker_bar_drag_rect (0)
, range_bar_drag_rect (0)
, transport_bar_drag_rect (0)
, transport_bar_range_rect (0)
, transport_bar_preroll_rect (0)
, transport_bar_postroll_rect (0)
, transport_loop_range_rect (0)
@ -475,6 +463,8 @@ Editor::Editor ()
, _main_menu_disabler (0)
, domain_bounce_info (nullptr)
, track_drag (nullptr)
, _visible_marker_types (all_marker_types)
, _visible_range_types (all_range_types)
{
/* we are a singleton */
@ -557,13 +547,6 @@ Editor::Editor ()
mark_label.hide();
mark_label.set_no_show_all();
cd_mark_label.set_name ("EditorRulerLabel");
cd_mark_label.set_size_request (-1, (int)timebar_height);
cd_mark_label.set_alignment (1.0, 0.5);
cd_mark_label.set_padding (5,0);
cd_mark_label.hide();
cd_mark_label.set_no_show_all();
section_mark_label.set_name ("EditorRulerLabel");
section_mark_label.set_size_request (-1, (int)timebar_height);
section_mark_label.set_alignment (1.0, 0.5);
@ -571,20 +554,6 @@ Editor::Editor ()
section_mark_label.hide();
section_mark_label.set_no_show_all();
cue_mark_label.set_name ("EditorRulerLabel");
cue_mark_label.set_size_request (-1, (int)timebar_height);
cue_mark_label.set_alignment (1.0, 0.5);
cue_mark_label.set_padding (5,0);
cue_mark_label.hide();
cue_mark_label.set_no_show_all();
scene_mark_label.set_name ("EditorRulerLabel");
scene_mark_label.set_size_request (-1, (int)timebar_height);
scene_mark_label.set_alignment (1.0, 0.5);
scene_mark_label.set_padding (5,0);
scene_mark_label.hide();
scene_mark_label.set_no_show_all();
videotl_bar_height = 4;
videotl_label.set_name ("EditorRulerLabel");
videotl_label.set_size_request (-1, (int)timebar_height * videotl_bar_height);
@ -600,13 +569,6 @@ Editor::Editor ()
range_mark_label.hide();
range_mark_label.set_no_show_all();
transport_mark_label.set_name ("EditorRulerLabel");
transport_mark_label.set_size_request (-1, (int)timebar_height);
transport_mark_label.set_alignment (1.0, 0.5);
transport_mark_label.set_padding (5,0);
transport_mark_label.hide();
transport_mark_label.set_no_show_all();
initialize_canvas ();
CairoWidget::set_focus_handler (sigc::mem_fun (ARDOUR_UI::instance(), &ARDOUR_UI::reset_focus));
@ -2297,7 +2259,6 @@ Editor::show_rulers_for_grid ()
ruler_samples_action->set_active(false);
}
} else if (_grid_type == GridTypeCDFrame) {
ruler_cd_marker_action->set_active(true);
ruler_minsec_action->set_active(true);
if (UIConfiguration::instance().get_rulers_follow_grid()) {
@ -4051,6 +4012,7 @@ void
Editor::grid_type_selection_done (GridType gridtype)
{
RefPtr<RadioAction> ract = grid_type_action (gridtype);
if (ract && ract->get_active()) { /*radio-action is already set*/
set_grid_to(gridtype); /*so we must set internal state here*/
} else {

View File

@ -935,11 +935,7 @@ private:
ArdourCanvas::Container* meter_group;
ArdourCanvas::Container* marker_group;
ArdourCanvas::Container* range_marker_group;
ArdourCanvas::Container* transport_marker_group;
ArdourCanvas::Container* cd_marker_group;
ArdourCanvas::Container* section_marker_group;
ArdourCanvas::Container* cue_marker_group;
ArdourCanvas::Container* scene_marker_group;
/* parent for groups which themselves contain time markers */
ArdourCanvas::Container* _time_markers_group;
@ -988,14 +984,22 @@ private:
Glib::RefPtr<Gtk::ToggleAction> ruler_meter_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_tempo_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_range_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_loop_punch_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_section_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_marker_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_cue_marker_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_scene_marker_action;
bool no_ruler_shown_update;
Glib::RefPtr<Gtk::RadioAction> all_marker_action;
Glib::RefPtr<Gtk::RadioAction> cd_marker_action;
Glib::RefPtr<Gtk::RadioAction> scene_marker_action;
Glib::RefPtr<Gtk::RadioAction> cue_marker_action;
Glib::RefPtr<Gtk::RadioAction> location_marker_action;
Glib::RefPtr<Gtk::RadioAction> all_range_action;
Glib::RefPtr<Gtk::RadioAction> punch_range_action;
Glib::RefPtr<Gtk::RadioAction> loop_range_action;
Glib::RefPtr<Gtk::RadioAction> session_range_action;
Glib::RefPtr<Gtk::RadioAction> other_range_action;
Gtk::Widget* ruler_grabbed_widget;
RulerDialog* ruler_dialog;
@ -1081,11 +1085,7 @@ private:
ArdourCanvas::Rectangle* meter_bar;
ArdourCanvas::Rectangle* marker_bar;
ArdourCanvas::Rectangle* range_marker_bar;
ArdourCanvas::Rectangle* transport_marker_bar;
ArdourCanvas::Rectangle* cd_marker_bar;
ArdourCanvas::Rectangle* section_marker_bar;
ArdourCanvas::Rectangle* cue_marker_bar;
ArdourCanvas::Rectangle* scene_marker_bar;
ArdourCanvas::Line* ruler_separator;
void toggle_cue_behavior ();
@ -1098,11 +1098,8 @@ private:
Gtk::Label meter_label;
Gtk::Label mark_label;
Gtk::Label range_mark_label;
Gtk::Label transport_mark_label;
Gtk::Label cd_mark_label;
Gtk::Label section_mark_label;
Gtk::Label cue_mark_label;
Gtk::Label scene_mark_label;
/* videtimline related actions */
Gtk::Label videotl_label;
@ -1799,6 +1796,29 @@ private:
Editing::EditPoint edit_point() const { return _edit_point; }
enum MarkerBarType {
CueMarks = 0x1,
SceneMarks = 0x2,
CDMarks = 0x4,
LocationMarks = 0x8
};
enum RangeBarType {
PunchRange = 0x1,
LoopRange = 0x2,
SessionRange = 0x4,
OtherRange = 0x8
};
static const MarkerBarType all_marker_types = MarkerBarType (CueMarks|SceneMarks|CDMarks|LocationMarks);
static const RangeBarType all_range_types = RangeBarType (PunchRange|LoopRange|SessionRange|OtherRange);
MarkerBarType visible_marker_types () const;
RangeBarType visible_range_types () const;
void set_visible_marker_types (MarkerBarType);
void set_visible_range_types (RangeBarType);
protected:
void _commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&, bool with_update = false);
@ -2137,11 +2157,7 @@ private:
/* transport range select process */
ArdourCanvas::Rectangle* cd_marker_bar_drag_rect;
ArdourCanvas::Rectangle* cue_marker_bar_drag_rect;
ArdourCanvas::Rectangle* range_bar_drag_rect;
ArdourCanvas::Rectangle* transport_bar_drag_rect;
ArdourCanvas::Rectangle* transport_bar_range_rect;
ArdourCanvas::Rectangle* transport_bar_preroll_rect;
ArdourCanvas::Rectangle* transport_bar_postroll_rect;
ArdourCanvas::Rectangle* transport_loop_range_rect;
@ -2632,6 +2648,14 @@ private:
};
TrackDrag* track_drag;
MarkerBarType _visible_marker_types;
RangeBarType _visible_range_types;
void update_mark_and_range_visibility ();
void show_marker_type (MarkerBarType);
void show_range_type (RangeBarType);
PBD::Signal0<void> VisibleMarkersChanged;
PBD::Signal0<void> VisibleRangesChanged;
friend class RegionMoveDrag;
friend class TrimDrag;
friend class MappingTwistDrag;

View File

@ -693,12 +693,23 @@ Editor::register_actions ()
ruler_meter_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Time Signature"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_tempo_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_range_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Range Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_loop_punch_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch Ranges"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_cd_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_section_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-arrangement-ruler"), _("Arrangement"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Location Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_scene_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-scene-marker-ruler"), _("Scene Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
ruler_cue_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cue-marker-ruler"), _("Cue Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
RadioAction::Group marker_choice_group;
RadioAction::Group range_choice_group;
all_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-all-markers"), _("All Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), all_marker_types)));
cd_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cd-markers"), _("CD Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CDMarks)));
scene_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-cue-markers"), _("Cue Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), SceneMarks)));
cue_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-scene-markers"), _("Scene Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), CueMarks)));
location_marker_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, marker_choice_group, X_("show-location-markers"), _("Location Markers"), sigc::bind (sigc::mem_fun(*this, &Editor::show_marker_type), LocationMarks)));
all_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-all-ranges"), _("All Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), all_range_types)));
session_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-session-range"), _("Session Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), SessionRange)));
punch_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-punch-range"), _("Punch Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), PunchRange)));
loop_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-loop-range"), _("Loop Range"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), LoopRange)));
other_range_action = Glib::RefPtr<RadioAction>::cast_static (ActionManager::register_radio_action (ruler_actions, range_choice_group, X_("show-other-ranges"), _("Other Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::show_range_type), OtherRange)));
ActionManager::register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));
@ -724,11 +735,7 @@ Editor::register_actions ()
ruler_meter_action->set_active (true);
ruler_tempo_action->set_active (true);
ruler_range_action->set_active (true);
ruler_loop_punch_action->set_active (true);
ruler_cd_marker_action->set_active (true);
ruler_marker_action->set_active (true);
ruler_cue_marker_action->set_active (true);
ruler_scene_marker_action->set_active (false);
ruler_video_action->set_active (false);
xjadeo_proc_action->set_active (false);

View File

@ -154,17 +154,13 @@ Editor::initialize_canvas ()
* ::update_ruler_visibility()
*/
cd_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, 0.0));
CANVAS_DEBUG_NAME (cd_marker_group, "cd marker group");
/* the video ruler is temporarily placed a the same location as the
cd_marker_group, but is moved later.
previous marker group, but is moved later.
*/
videotl_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple(0.0, 0.0));
CANVAS_DEBUG_NAME (videotl_group, "videotl group");
marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, timebar_height + 1.0));
CANVAS_DEBUG_NAME (marker_group, "marker group");
transport_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 2.0) + 1.0));
CANVAS_DEBUG_NAME (transport_marker_group, "transport marker group");
range_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 3.0) + 1.0));
CANVAS_DEBUG_NAME (range_marker_group, "range marker group");
tempo_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 4.0) + 1.0));
@ -173,8 +169,6 @@ Editor::initialize_canvas ()
CANVAS_DEBUG_NAME (section_marker_group, "Arranger marker group");
meter_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
CANVAS_DEBUG_NAME (meter_group, "meter group");
scene_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
CANVAS_DEBUG_NAME (scene_marker_group, "scene marker_group");
float timebar_thickness = timebar_height; //was 4
float timebar_top = (timebar_height - timebar_thickness)/2;
@ -193,25 +187,12 @@ Editor::initialize_canvas ()
range_marker_bar = new ArdourCanvas::Rectangle (range_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (range_marker_bar, "Range Marker Bar");
transport_marker_bar = new ArdourCanvas::Rectangle (transport_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (transport_marker_bar, "transport Marker Bar");
marker_bar = new ArdourCanvas::Rectangle (marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (marker_bar, "Marker Bar");
cd_marker_bar = new ArdourCanvas::Rectangle (cd_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (cd_marker_bar, "CD Marker Bar");
section_marker_bar = new ArdourCanvas::Rectangle (section_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (section_marker_bar, "Arranger Marker Bar");
cue_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, 0.0));
cue_marker_bar = new ArdourCanvas::Rectangle (cue_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (cue_marker_bar, "Cue Marker Bar");
scene_marker_bar = new ArdourCanvas::Rectangle (scene_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
CANVAS_DEBUG_NAME (cue_marker_bar, "Scene Marker Bar");
ruler_separator = new ArdourCanvas::Line(_time_markers_group);
CANVAS_DEBUG_NAME (ruler_separator, "separator between ruler and main canvas");
ruler_separator->set (ArdourCanvas::Duple(0.0, 0.0), ArdourCanvas::Duple(ArdourCanvas::COORD_MAX, 0.0));
@ -221,26 +202,11 @@ Editor::initialize_canvas ()
ARDOUR_UI::instance()->video_timeline = new VideoTimeLine(this, videotl_group, (timebar_height * videotl_bar_height));
cd_marker_bar_drag_rect = new ArdourCanvas::Rectangle (cd_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
CANVAS_DEBUG_NAME (cd_marker_bar_drag_rect, "cd marker drag");
cd_marker_bar_drag_rect->set_outline (false);
cd_marker_bar_drag_rect->hide ();
cue_marker_bar_drag_rect = new ArdourCanvas::Rectangle (cue_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
CANVAS_DEBUG_NAME (cd_marker_bar_drag_rect, "cd marker drag");
cue_marker_bar_drag_rect->set_outline (false);
cue_marker_bar_drag_rect->hide ();
range_bar_drag_rect = new ArdourCanvas::Rectangle (range_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
CANVAS_DEBUG_NAME (range_bar_drag_rect, "range drag");
range_bar_drag_rect->set_outline (false);
range_bar_drag_rect->hide ();
transport_bar_drag_rect = new ArdourCanvas::Rectangle (transport_marker_group, ArdourCanvas::Rect (0.0, 0.0, 100, timebar_height));
CANVAS_DEBUG_NAME (transport_bar_drag_rect, "transport drag");
transport_bar_drag_rect->set_outline (false);
transport_bar_drag_rect->hide ();
transport_punchin_line = new ArdourCanvas::Line (hv_scroll_group);
transport_punchin_line->set_x0 (0);
transport_punchin_line->set_y0 (0);
@ -258,13 +224,9 @@ Editor::initialize_canvas ()
tempo_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), tempo_bar, TempoBarItem, "tempo bar"));
meter_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), meter_bar, MeterBarItem, "meter bar"));
marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), marker_bar, MarkerBarItem, "marker bar"));
cd_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cd_marker_bar, CdMarkerBarItem, "cd marker bar"));
section_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), section_marker_bar, SectionMarkerBarItem, "arrangement marker bar"));
cue_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cue_marker_bar, CueMarkerBarItem, "cd marker bar"));
scene_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), scene_marker_bar, SceneMarkerBarItem, "scene marker bar"));
videotl_group->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_videotl_bar_event), videotl_group));
range_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), range_marker_bar, RangeMarkerBarItem, "range marker bar"));
transport_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), transport_marker_bar, TransportMarkerBarItem, "transport marker bar"));
_playhead_cursor = new EditorCursor (*this, &Editor::canvas_playhead_cursor_event, X_("playhead"));
_playhead_cursor->set_sensitive (UIConfiguration::instance().get_sensitize_playhead());
@ -1091,33 +1053,15 @@ Editor::color_handler()
marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("marker bar", "marker bar"));
marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
cd_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("cd marker bar", "marker bar"));
cd_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
section_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("arrangement marker bar", "marker bar"));
section_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
scene_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("arrangement marker bar", "marker bar"));
scene_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
cue_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("cd marker bar", "marker bar"));
cue_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
range_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("range marker bar", "marker bar"));
range_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
transport_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("transport marker bar", "marker bar"));
transport_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
cd_marker_bar_drag_rect->set_fill_color (UIConfiguration::instance().color ("range drag bar rect"));
cd_marker_bar_drag_rect->set_outline_color (UIConfiguration::instance().color ("range drag bar rect"));
range_bar_drag_rect->set_fill_color (UIConfiguration::instance().color ("range drag bar rect"));
range_bar_drag_rect->set_outline_color (UIConfiguration::instance().color ("range drag bar rect"));
transport_bar_drag_rect->set_fill_color (UIConfiguration::instance().color ("transport drag rect"));
transport_bar_drag_rect->set_outline_color (UIConfiguration::instance().color ("transport drag rect"));
transport_loop_range_rect->set_fill_color (UIConfiguration::instance().color_mod ("transport loop rect", "loop rectangle"));
transport_loop_range_rect->set_outline_color (UIConfiguration::instance().color ("transport loop rect"));

View File

@ -5957,16 +5957,10 @@ RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
switch (_operation) {
case CreateSkipMarker:
crect = _editor->range_bar_drag_rect;
break;
case CreateRangeMarker:
crect = _editor->range_bar_drag_rect;
break;
case CreateTransportMarker:
crect = _editor->transport_bar_drag_rect;
break;
case CreateCDMarker:
crect = _editor->cd_marker_bar_drag_rect;
crect = _editor->range_bar_drag_rect;
break;
default:
error << string_compose (_("programming_error: %1"), "Error: unknown range marker op passed to Editor::drag_range_markerbar_op ()") << endmsg;
@ -6042,9 +6036,9 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
_editor->session ()->locations ()->next_available_name (rangename, _("CD"));
_editor->begin_reversible_command (_("new CD marker"));
flags = Location::Flags (Location::IsRangeMarker | Location::IsCDMarker);
_editor->cd_marker_bar_drag_rect->hide ();
_editor->range_bar_drag_rect->hide ();
} else {
_editor->begin_reversible_command (_("new skip marker"));
_editor->begin_reversible_command (_("new range marker"));
_editor->session ()->locations ()->next_available_name (rangename, _("unnamed"));
flags = Location::IsRangeMarker;
_editor->range_bar_drag_rect->hide ();

View File

@ -131,6 +131,8 @@ Editor::add_new_location_internal (Location* location)
{
LocationMarkers *lam = new LocationMarkers;
std::string color;
MarkerBarType mark_type = MarkerBarType (0);
RangeBarType range_type = RangeBarType (0);
/* make a note here of which group this marker ends up in */
ArdourCanvas::Container* group = 0;
@ -154,21 +156,25 @@ Editor::add_new_location_internal (Location* location)
if (location->is_mark()) {
if (location->is_cd_marker()) {
lam->start = new ArdourMarker (*this, *cd_marker_group, color, location->name(), marker_type (location), location->start());
group = cd_marker_group;
} else if (location->is_cue_marker()) {
lam->start = new ArdourMarker (*this, *cue_marker_group, color, location->name(), marker_type (location), location->start());
lam->start->set_cue_index(location->cue_id());
group = cue_marker_group;
} else if (location->is_section()) {
lam->start = new ArdourMarker (*this, *section_marker_group, color, location->name(), marker_type (location), location->start());
group = section_marker_group;
} else if (location->is_scene()) {
lam->start = new ArdourMarker (*this, *scene_marker_group, color, location->name(), marker_type (location), location->start());
group = scene_marker_group;
} else {
lam->start = new ArdourMarker (*this, *marker_group, color, location->name(), marker_type (location), location->start());
group = marker_group;
mark_type = CDMarks;
lam->start = new ArdourMarker (*this, *group, color, location->name(), marker_type (location), location->start());
} else if (location->is_cue_marker()) {
group = marker_group;
mark_type = CueMarks;
lam->start = new ArdourMarker (*this, *group, color, location->name(), marker_type (location), location->start());
lam->start->set_cue_index(location->cue_id());
} else if (location->is_section()) {
group = section_marker_group;
lam->start = new ArdourMarker (*this, *group, color, location->name(), marker_type (location), location->start());
} else if (location->is_scene()) {
mark_type = CueMarks;
group = marker_group;
lam->start = new ArdourMarker (*this, *group, color, location->name(), marker_type (location), location->start());
} else {
group = marker_group;
mark_type = LocationMarks;
lam->start = new ArdourMarker (*this, *group, color, location->name(), marker_type (location), location->start());
}
lam->end = 0;
@ -176,43 +182,39 @@ Editor::add_new_location_internal (Location* location)
} else if (location->is_auto_loop()) {
// transport marker
lam->start = new ArdourMarker (*this, *transport_marker_group, color,
group = range_marker_group;
range_type = LoopRange;
lam->start = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *transport_marker_group, color,
lam->end = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location, false), location->end());
group = transport_marker_group;
} else if (location->is_auto_punch()) {
// transport marker
lam->start = new ArdourMarker (*this, *transport_marker_group, color,
group = range_marker_group;
range_type = PunchRange;
lam->start = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *transport_marker_group, color,
lam->end = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location, false), location->end());
group = transport_marker_group;
} else if (location->is_session_range()) {
// session range
lam->start = new ArdourMarker (*this, *marker_group, color, _("start"), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *marker_group, color, _("end"), marker_type (location, false), location->end());
group = marker_group;
group = range_marker_group;
range_type = SessionRange;
lam->start = new ArdourMarker (*this, *group, color, _("start"), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *group, color, _("end"), marker_type (location, false), location->end());
} else {
// range marker
if (location->is_cd_marker()) {
lam->start = new ArdourMarker (*this, *cd_marker_group, color,
location->name(), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *cd_marker_group, color,
location->name(), marker_type (location, false), location->end());
group = cd_marker_group;
} else {
lam->start = new ArdourMarker (*this, *range_marker_group, color,
location->name(), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *range_marker_group, color,
location->name(), marker_type (location, false), location->end());
group = range_marker_group;
}
group = range_marker_group;
range_type = OtherRange;
lam->start = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location), location->start());
lam->end = new ArdourMarker (*this, *group, color,
location->name(), marker_type (location, false), location->end());
}
#if 0
@ -224,7 +226,21 @@ Editor::add_new_location_internal (Location* location)
if (location->is_hidden ()) {
lam->hide();
} else {
lam->show ();
if (mark_type) {
if (!(_visible_marker_types & mark_type)) {
lam->hide ();
} else {
lam->show ();
}
} else if (range_type) {
if (!(_visible_range_types & range_type)) {
lam->hide ();
} else {
lam->show ();
}
} else {
lam->show ();
}
}
location->NameChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, location), gui_context());
@ -544,13 +560,13 @@ Editor::reparent_location_markers (LocationMarkers* lam, ArdourCanvas::Item* new
void Editor::ensure_marker_updated (LocationMarkers* lam, Location* location)
{
if (location->is_cd_marker()) {
reparent_location_markers (lam, cd_marker_group);
reparent_location_markers (lam, marker_group);
} else if (location->is_scene()) {
reparent_location_markers (lam, scene_marker_group);
reparent_location_markers (lam, marker_group);
} else if (location->is_section()) {
reparent_location_markers (lam, section_marker_group);
} else if (location->is_cue_marker()) {
reparent_location_markers (lam, cue_marker_group);
reparent_location_markers (lam, marker_group);
} else if (location->is_mark() || location->matches (Location::Flags(0))) {
reparent_location_markers (lam, marker_group);
}
@ -1920,8 +1936,6 @@ void
Editor::new_transport_marker_menu_popdown ()
{
// hide rects
transport_bar_drag_rect->hide();
_drags->abort ();
}
@ -2117,3 +2131,152 @@ Editor::toggle_cue_behavior ()
_session->config.set_cue_behavior (ARDOUR::CueBehavior (cb | ARDOUR::FollowCues));
}
}
void
Editor::set_visible_marker_types (MarkerBarType mbt)
{
_visible_marker_types = mbt;
update_mark_and_range_visibility ();
VisibleMarkersChanged ();
}
void
Editor::set_visible_range_types (RangeBarType rbt)
{
_visible_range_types = rbt;
update_mark_and_range_visibility ();
VisibleRangesChanged ();
}
Editor::MarkerBarType
Editor::visible_marker_types () const
{
return _visible_marker_types;
}
Editor::RangeBarType
Editor::visible_range_types () const
{
return _visible_range_types;
}
void
Editor::update_mark_and_range_visibility ()
{
for (auto & l : location_markers) {
Location* location = l.first;
LocationMarkers* lam = l.second;
MarkerBarType mark_type = MarkerBarType (0);
RangeBarType range_type = RangeBarType (0);
if (location->is_mark()) {
if (location->is_cd_marker()) {
mark_type = CDMarks;
} else if (location->is_cue_marker()) {
mark_type = CueMarks;
} else if (location->is_section()) {
} else if (location->is_scene()) {
mark_type = CueMarks;
} else {
mark_type = LocationMarks;
}
} else if (location->is_auto_loop()) {
range_type = LoopRange;
} else if (location->is_auto_punch()) {
range_type = PunchRange;
} else if (location->is_session_range()) {
range_type = SessionRange;
} else {
range_type = OtherRange;
}
if (location->is_hidden ()) {
lam->hide();
} else {
if (mark_type) {
if (!(_visible_marker_types & mark_type)) {
lam->hide ();
} else {
lam->show ();
}
} else if (range_type) {
if (!(_visible_range_types & range_type)) {
lam->hide ();
} else {
lam->show ();
}
} else {
lam->show ();
}
}
}
}
void
Editor::show_marker_type (MarkerBarType mbt)
{
Glib::RefPtr<Gtk::RadioAction> action;
switch (mbt) {
case CDMarks:
action = cd_marker_action;
break;
case CueMarks:
action = cue_marker_action;
break;
case SceneMarks:
action = scene_marker_action;
break;
case LocationMarks:
action = location_marker_action;
break;
default:
action = all_marker_action;
break;
}
if (action->get_active()) {
/* Only change things for the currently active action, since
this will be called for both the deactivated action, and the
newly activated one.
*/
set_visible_marker_types (mbt);
}
}
void
Editor::show_range_type (RangeBarType rbt)
{
Glib::RefPtr<Gtk::RadioAction> action;
switch (rbt) {
case OtherRange:
action = other_range_action;
break;
case PunchRange:
action = punch_range_action;
break;
case LoopRange:
action = loop_range_action;
break;
case SessionRange:
action = session_range_action;
break;
default:
action = all_range_action;
break;
}
if (action->get_active()) {
/* Only change things for the currently active action, since
this will be called for both the deactivated action, and the
newly activated one.
*/
set_visible_range_types (rbt);
}
}

View File

@ -176,11 +176,7 @@ Editor::initialize_rulers ()
lab_children.push_back (Element(tempo_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(meter_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(transport_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(cd_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(cue_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(scene_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(section_mark_label, PACK_SHRINK, PACK_START));
lab_children.push_back (Element(videotl_label, PACK_SHRINK, PACK_START));
@ -223,6 +219,39 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
editor_ruler_menu->set_name ("ArdourContextMenu");
ruler_items.clear();
#define MAKE_ACTION_ITEM(menu,item,action_group,action_name) \
(item) = new (Gtk::CheckMenuItem); \
gtk_activatable_set_related_action (GTK_ACTIVATABLE((item)->gobj()), ActionManager::get_action (action_group, action_name)->gobj()); \
(item)->set_draw_as_radio (); \
(menu)->append (*(item));
Gtk::Menu* ms_menu = new (Gtk::Menu);
Gtk::CheckMenuItem* ms_item;
MAKE_ACTION_ITEM (ms_menu, ms_item, X_("Rulers"), X_("show-all-markers"));
MAKE_ACTION_ITEM (ms_menu, ms_item, X_("Rulers"), X_("show-cue-markers"));
MAKE_ACTION_ITEM (ms_menu, ms_item, X_("Rulers"), X_("show-cd-markers"));
MAKE_ACTION_ITEM (ms_menu, ms_item, X_("Rulers"), X_("show-scene-markers"));
MAKE_ACTION_ITEM (ms_menu, ms_item, X_("Rulers"), X_("show-location-markers"));
ruler_items.push_back (MenuElem (_("Locations")));
Gtk::MenuItem& marker_show_menu = ruler_items.back();
marker_show_menu.set_submenu (*ms_menu);
Gtk::Menu* rs_menu = new (Gtk::Menu);
Gtk::CheckMenuItem* rs_item;
MAKE_ACTION_ITEM (rs_menu, rs_item, X_("Rulers"), X_("show-all-ranges"));
MAKE_ACTION_ITEM (rs_menu, rs_item, X_("Rulers"), X_("show-punch-range"));
MAKE_ACTION_ITEM (rs_menu, rs_item, X_("Rulers"), X_("show-loop-range"));
MAKE_ACTION_ITEM (rs_menu, rs_item, X_("Rulers"), X_("show-session-range"));
MAKE_ACTION_ITEM (rs_menu, rs_item, X_("Rulers"), X_("show-location-markers"));
ruler_items.push_back (MenuElem (_("Ranges")));
Gtk::MenuItem& range_show_menu = ruler_items.back();
range_show_menu.set_submenu (*rs_menu);
#undef MAKE_ACTION_ITEM
switch (t) {
case MarkerBarItem:
ruler_items.push_back (MenuElem (_("New Location Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags (0), 0)));
@ -346,11 +375,8 @@ Editor::store_ruler_visibility ()
node->set_property (X_("meter"), ruler_meter_action->get_active());
node->set_property (X_("tempo"), ruler_tempo_action->get_active());
node->set_property (X_("rangemarker"), ruler_range_action->get_active());
node->set_property (X_("transportmarker"), ruler_loop_punch_action->get_active());
node->set_property (X_("cdmarker"), ruler_cd_marker_action->get_active());
node->set_property (X_("arrangement"), ruler_section_action->get_active());
node->set_property (X_("marker"), ruler_marker_action->get_active());
node->set_property (X_("cuemarker"), ruler_cue_marker_action->get_active());
node->set_property (X_("arrangement"), ruler_section_action->get_active());
node->set_property (X_("videotl"), ruler_video_action->get_active());
_session->add_extra_xml (*node);
@ -389,48 +415,12 @@ Editor::restore_ruler_visibility ()
if (node->get_property ("rangemarker", yn)) {
ruler_range_action->set_active (yn);
}
if (node->get_property ("transportmarker", yn)) {
ruler_loop_punch_action->set_active (yn);
}
if (node->get_property ("cdmarker", yn)) {
ruler_cd_marker_action->set_active (yn);
} else {
// this _session doesn't yet know about the cdmarker ruler
// as a benefit to the user who doesn't know the feature exists, show the ruler if
// any cd marks exist
ruler_cd_marker_action->set_active (false);
const Locations::LocationList & locs = _session->locations()->list();
for (Locations::LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
if ((*i)->is_cd_marker()) {
ruler_cd_marker_action->set_active (true);
break;
}
}
}
if (node->get_property ("arrangement", yn)) {
ruler_section_action->set_active (yn);
} else {
ruler_section_action->set_active (true);
}
if (node->get_property ("cuemarker", yn)) {
ruler_cue_marker_action->set_active (yn);
} else {
// this _session doesn't yet know about the cue marker ruler
// as a benefit to the user who doesn't know the feature exists, show the ruler if
// any cue marks exist
ruler_cue_marker_action->set_active (false);
const Locations::LocationList & locs = _session->locations()->list();
for (Locations::LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
if ((*i)->is_cue_marker()) {
ruler_cue_marker_action->set_active (true);
break;
}
}
}
if (node->get_property ("videotl", yn)) {
ruler_video_action->set_active (yn);
}
@ -445,10 +435,7 @@ Editor::restore_ruler_visibility ()
ruler_meter_action->set_active (td == Temporal::BeatTime);
ruler_tempo_action->set_active (td == Temporal::BeatTime);
ruler_range_action->set_active (true);
ruler_loop_punch_action->set_active (td == Temporal::BeatTime);
ruler_cd_marker_action->set_active (td == Temporal::AudioTime);
ruler_marker_action->set_active (true);
ruler_cue_marker_action->set_active (td == Temporal::BeatTime);
ruler_section_action->set_active (td == Temporal::BeatTime);
}
@ -602,46 +589,6 @@ Editor::update_ruler_visibility ()
range_mark_label.hide();
}
if (ruler_loop_punch_action->get_active()) {
old_unit_pos = transport_marker_group->position().y;
if (tbpos != old_unit_pos) {
transport_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
transport_marker_group->show();
transport_mark_label.show();
transport_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
} else {
transport_marker_group->hide();
transport_mark_label.hide();
}
if (ruler_cd_marker_action->get_active()) {
old_unit_pos = cd_marker_group->position().y;
if (tbpos != old_unit_pos) {
cd_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
cd_marker_group->show();
cd_mark_label.show();
cd_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
// make sure all cd markers show up in their respective places
update_marker_display();
} else {
cd_marker_group->hide();
cd_mark_label.hide();
// make sure all cd markers show up in their respective places
update_marker_display();
}
if (ruler_marker_action->get_active()) {
old_unit_pos = marker_group->position().y;
if (tbpos != old_unit_pos) {
@ -660,43 +607,6 @@ Editor::update_ruler_visibility ()
mark_label.hide();
}
if (ruler_cue_marker_action->get_active()) {
old_unit_pos = cue_marker_group->position().y;
if (tbpos != old_unit_pos) {
cue_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
cue_marker_group->show();
cue_mark_label.show();
cue_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
} else {
cue_marker_group->hide();
cue_mark_label.hide();
}
if (ruler_scene_marker_action->get_active()) {
old_unit_pos = scene_marker_group->position().y;
if (tbpos != old_unit_pos) {
scene_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
}
scene_marker_group->show();
scene_mark_label.show();
scene_marker_bar->set_outline(false);
tbpos += timebar_height;
tbgpos += timebar_height;
visible_timebars++;
update_marker_display();
} else {
scene_marker_group->hide ();
scene_mark_label.hide ();
}
if (!Profile->get_livetrax() && ruler_section_action->get_active()) {
old_unit_pos = section_marker_group->position().y;
if (tbpos != old_unit_pos) {
@ -1264,7 +1174,7 @@ Editor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t l
#if 0 // DEBUG GRID
for (auto const& g : grid) {
std::cout << "Grid " << g.time() << " Beats: " << g.beats() << " BBT: " << g.bbt() << " sample: " << g.sample(_session->nominal_sample_rate ()) << "\n";
std::cout << "Grid " << g.time() << " Beats: " << g.beats() << " BBT: " << g.bbt() << " sample: " << g.sample(_session->nominal_sample_rate ()) << "\n";
}
#endif