13
0

move cue-behavior to session config (gtk part)

This commit is contained in:
Ben Loftis 2022-02-19 10:56:59 -06:00
parent b506a243a2
commit 5f0c7fe3d6
3 changed files with 6 additions and 6 deletions

View File

@ -462,7 +462,7 @@ ARDOUR_UI::parameter_changed (std::string p)
scripts_spacer.show ();
}
} else if (p == "cue-behavior") {
CueBehavior cb (Config->get_cue_behavior());
CueBehavior cb (_session->config.get_cue_behavior());
_cue_play_enable.set_active (cb & ARDOUR::FollowCues);
} else if (p == "layered-record-mode") {
layered_button.set_active (_session->config.get_layered_record_mode ());

View File

@ -1968,11 +1968,11 @@ Editor::find_marker_from_location_id (PBD::ID const & id, bool is_start) const
void
Editor::toggle_cue_behavior ()
{
CueBehavior cb (Config->get_cue_behavior());
CueBehavior cb (_session->config.get_cue_behavior());
if (cb & ARDOUR::FollowCues) {
Config->set_cue_behavior (ARDOUR::CueBehavior (cb & ~ARDOUR::FollowCues));
_session->config.set_cue_behavior (ARDOUR::CueBehavior (cb & ~ARDOUR::FollowCues));
} else {
Config->set_cue_behavior (ARDOUR::CueBehavior (cb | ARDOUR::FollowCues));
_session->config.set_cue_behavior (ARDOUR::CueBehavior (cb | ARDOUR::FollowCues));
}
}

View File

@ -419,7 +419,7 @@ MiniTimeline::draw_cue (cairo_t* cr, int marker_loc, int next_cue_left_edge, int
uint32_t color = UIConfiguration::instance().color (
prelight ? "entered marker" : "location marker");
CueBehavior cb (Config->get_cue_behavior());
CueBehavior cb (_session->config.get_cue_behavior());
if (!(cb & ARDOUR::FollowCues)) {
color = Gtkmm2ext::HSV(color).darker(0.5).color();
};
@ -706,7 +706,7 @@ MiniTimeline::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_
/* if there is a cue off-window immediately to the left, we need to draw its bar to show that Cues are continuous */
if (prior_cue_pos < 0 && prior_cue_idx != INT32_MAX) {
uint32_t color = UIConfiguration::instance().color ("location marker");
CueBehavior cb (Config->get_cue_behavior());
CueBehavior cb (_session->config.get_cue_behavior());
if (!(cb & ARDOUR::FollowCues)) {
color = Gtkmm2ext::HSV(color).darker(0.5).color();
};