13
0

L: consolidate ruler visibility checks to one place (instant.xml)

This commit is contained in:
Ben Loftis 2024-05-19 21:34:40 -05:00
parent c81faa8f9e
commit d99cbdf04a

View File

@ -439,6 +439,20 @@ Editor::restore_ruler_visibility ()
ruler_section_action->set_active (td == Temporal::BeatTime);
}
if (ARDOUR::Profile->get_livetrax()){
ruler_minsec_action->set_active (false);
ruler_timecode_action->set_active (false);
ruler_samples_action->set_active (false);
ruler_bbt_action->set_active (false);
ruler_meter_action->set_active (false);
ruler_tempo_action->set_active (false);
ruler_timecode_action->set_active (true);
ruler_range_action->set_active (true);
ruler_marker_action->set_active (true);
ruler_section_action->set_active (true);
}
no_ruler_shown_update = false;
update_ruler_visibility ();
}
@ -475,7 +489,7 @@ Editor::update_ruler_visibility ()
videotl_label.hide();
#endif
if (!Profile->get_livetrax() && ruler_minsec_action->get_active()) {
if (ruler_minsec_action->get_active()) {
old_unit_pos = minsec_ruler->position().y;
if (tbpos != old_unit_pos) {
minsec_ruler->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -491,7 +505,7 @@ Editor::update_ruler_visibility ()
minsec_label.hide();
}
if (!Profile->get_livetrax() && ruler_samples_action->get_active()) {
if (ruler_samples_action->get_active()) {
old_unit_pos = samples_ruler->position().y;
if (tbpos != old_unit_pos) {
samples_ruler->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -507,7 +521,7 @@ Editor::update_ruler_visibility ()
samples_label.hide();
}
if (!Profile->get_livetrax() && ruler_bbt_action->get_active()) {
if (ruler_bbt_action->get_active()) {
old_unit_pos = bbt_ruler->position().y;
if (tbpos != old_unit_pos) {
bbt_ruler->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -523,7 +537,7 @@ Editor::update_ruler_visibility ()
bbt_label.hide();
}
if (!Profile->get_livetrax() && ruler_tempo_action->get_active()) {
if (ruler_tempo_action->get_active()) {
old_unit_pos = tempo_group->position().y;
if (tbpos != old_unit_pos) {
tempo_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -538,7 +552,7 @@ Editor::update_ruler_visibility ()
tempo_label.hide();
}
if (!Profile->get_livetrax() && ruler_meter_action->get_active()) {
if (ruler_meter_action->get_active()) {
old_unit_pos = meter_group->position().y;
if (tbpos != old_unit_pos) {
meter_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -553,7 +567,7 @@ Editor::update_ruler_visibility ()
meter_label.hide();
}
if (!Profile->get_livetrax() && ruler_range_action->get_active()) {
if (ruler_range_action->get_active()) {
old_unit_pos = range_marker_group->position().y;
if (tbpos != old_unit_pos) {
range_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -609,7 +623,7 @@ Editor::update_ruler_visibility ()
update_marker_display();
}
if (!Profile->get_livetrax() && ruler_video_action->get_active()) {
if (ruler_video_action->get_active()) {
old_unit_pos = videotl_group->position().y;
if (tbpos != old_unit_pos) {
videotl_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
@ -626,7 +640,7 @@ Editor::update_ruler_visibility ()
update_video_timeline(true);
}
if (Profile->get_livetrax() || ruler_timecode_action->get_active()) {
if (ruler_timecode_action->get_active()) {
old_unit_pos = timecode_ruler->position().y;
if (tbpos != old_unit_pos) {
timecode_ruler->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));