13
0

fix consistency and accuracy of tempo edit behavior setting

This commit is contained in:
Paul Davis 2023-04-22 11:12:15 -06:00
parent 65380797e1
commit 65c81feb5e
4 changed files with 8 additions and 6 deletions

View File

@ -469,7 +469,7 @@ Editor::Editor ()
, _stepping_axis_view (0) , _stepping_axis_view (0)
, quantize_dialog (0) , quantize_dialog (0)
, _main_menu_disabler (0) , _main_menu_disabler (0)
, _tempo_edit_behavior (UIConfiguration::instance().get_default_tempo_edit_behavior()) , _tempo_edit_behavior (UIConfiguration::instance().get_tempo_edit_behavior())
{ {
/* we are a singleton */ /* we are a singleton */
@ -6754,6 +6754,8 @@ Editor::ui_parameter_changed (string parameter)
_track_canvas->request_redraw (_track_canvas->visible_area()); _track_canvas->request_redraw (_track_canvas->visible_area());
} else if (parameter == "use-note-color-for-velocity") { } else if (parameter == "use-note-color-for-velocity") {
/* handled individually by each MidiRegionView */ /* handled individually by each MidiRegionView */
} else if (parameter == "tempo-edit-behavior") {
set_tempo_edit_behavior (UIConfiguration::instance().get_tempo_edit_behavior());
} }
} }

View File

@ -191,7 +191,7 @@ Editor::initialize_canvas ()
mapping_bar->set_outline(false); mapping_bar->set_outline(false);
mapping_bar->set_outline_what(ArdourCanvas::Rectangle::BOTTOM); mapping_bar->set_outline_what(ArdourCanvas::Rectangle::BOTTOM);
switch (UIConfiguration::instance().get_default_tempo_edit_behavior()) { switch (UIConfiguration::instance().get_tempo_edit_behavior()) {
case Editing::TempoMapping: case Editing::TempoMapping:
tempo_group->hide (); tempo_group->hide ();
break; break;

View File

@ -4501,8 +4501,8 @@ These settings will only take effect after %1 is restarted.\n\
ComboOption<Editing::TempoEditBehavior>* teb = new ComboOption<Editing::TempoEditBehavior> ( ComboOption<Editing::TempoEditBehavior>* teb = new ComboOption<Editing::TempoEditBehavior> (
"default-tempo-edit-behavior", "default-tempo-edit-behavior",
_("Default tempo ruler state for new sessions"), _("Default tempo ruler state for new sessions"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_default_tempo_edit_behavior), sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_tempo_edit_behavior),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_tempo_edit_behavior)); sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_tempo_edit_behavior));
teb->add (Editing::TempoMapping, _("mapping a recorded performance")); teb->add (Editing::TempoMapping, _("mapping a recorded performance"));
teb->add (Editing::TempoChanging, _("constructing a tempo map from scratch")); teb->add (Editing::TempoChanging, _("constructing a tempo map from scratch"));

View File

@ -149,9 +149,9 @@ UI_CONFIG_VARIABLE (bool, ask_before_closing_last_window, "ask-before-closing-la
UI_CONFIG_VARIABLE (std::string, freesound_dir, "freesound-dir", "") UI_CONFIG_VARIABLE (std::string, freesound_dir, "freesound-dir", "")
UI_CONFIG_VARIABLE (int, max_note_height, "max-note-height", 20) UI_CONFIG_VARIABLE (int, max_note_height, "max-note-height", 20)
#ifdef MIXBUS #ifdef MIXBUS
UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, default_tempo_edit_behavior, "default-tempo-edit-behavior", Editing::TempoMapping) UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, tempo_edit_behavior, "tempo-edit-behavior", Editing::TempoMapping)
#else #else
UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, default_tempo_edit_behavior, "default-tempo-edit-behavior", Editing::TempoChanging) UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, tempo_edit_behavior, "tempo-edit-behavior", Editing::TempoChanging)
#endif #endif
/* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */ /* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */