mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 14:46:34 +01:00
[Summary] Added "Enable Group Edit" session parameter and handler to process menu item requests and state updates
This commit is contained in:
parent
930b87d8e1
commit
6f32d4e7c2
4 changed files with 59 additions and 13 deletions
|
|
@ -322,15 +322,15 @@ Editor::Editor ()
|
|||
, _stepping_axis_view (0)
|
||||
, current_mixer_strip (0)
|
||||
, _master_bus_ui (0)
|
||||
, _set_session_in_progress(false)
|
||||
, _midi_input_dropdown (get_waves_dropdown ("midi_input_dropdown"))
|
||||
, _midi_output_dropdown (get_waves_dropdown ("midi_output_dropdown"))
|
||||
, midi_marker_input_activity_image (get_image ("midi_input_activity_indicator"))
|
||||
, midi_marker_output_activity_image (get_image ("midi_output_activity_indicator"))
|
||||
, midi_marker_input_enabled_image (get_image ("midi_input_enabled_indicator"))
|
||||
, midi_marker_input_disabled_image (get_image ("midi_input_disabled_indicator"))
|
||||
, midi_marker_output_enabled_image (get_image ("midi_output_enabled_indicator"))
|
||||
, midi_marker_output_disabled_image (get_image ("midi_output_disabled_indicator"))
|
||||
, _set_session_in_progress(false)
|
||||
, _midi_input_dropdown (get_waves_dropdown ("midi_input_dropdown"))
|
||||
, _midi_output_dropdown (get_waves_dropdown ("midi_output_dropdown"))
|
||||
, midi_marker_input_activity_image (get_image ("midi_input_activity_indicator"))
|
||||
, midi_marker_output_activity_image (get_image ("midi_output_activity_indicator"))
|
||||
, midi_marker_input_enabled_image (get_image ("midi_input_enabled_indicator"))
|
||||
, midi_marker_input_disabled_image (get_image ("midi_input_disabled_indicator"))
|
||||
, midi_marker_output_enabled_image (get_image ("midi_output_enabled_indicator"))
|
||||
, midi_marker_output_disabled_image (get_image ("midi_output_disabled_indicator"))
|
||||
{
|
||||
constructed = false;
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ Editor::Editor ()
|
|||
clicked_routeview = 0;
|
||||
clicked_control_point = 0;
|
||||
last_update_frame = 0;
|
||||
pre_press_cursor = 0;
|
||||
pre_press_cursor = 0;
|
||||
_drags = new DragManager (this);
|
||||
lock_dialog = 0;
|
||||
ruler_dialog = 0;
|
||||
|
|
@ -390,6 +390,7 @@ Editor::Editor ()
|
|||
current_interthread_info = 0;
|
||||
_show_measures = true;
|
||||
_maximised = false;
|
||||
_enable_group_edit = false;
|
||||
show_gain_after_trim = false;
|
||||
|
||||
have_pending_keyboard_selection = false;
|
||||
|
|
@ -3896,6 +3897,29 @@ Editor::set_stationary_playhead (bool yn)
|
|||
}
|
||||
}
|
||||
|
||||
void Editor::toggle_enable_group_edit ()
|
||||
{
|
||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-enable-group-edit"));
|
||||
if (act) {
|
||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
set_enable_group_edit (tact->get_active());
|
||||
}
|
||||
}
|
||||
|
||||
void Editor::set_enable_group_edit (bool yn)
|
||||
{
|
||||
if (_enable_group_edit != yn) {
|
||||
_enable_group_edit = yn;
|
||||
|
||||
if (_session) {
|
||||
_session->config.set_enable_group_edit(yn);
|
||||
}
|
||||
|
||||
instant_save ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PlaylistSelector&
|
||||
Editor::playlist_selector () const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,6 +213,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void separate_regions_using_location (ARDOUR::Location&);
|
||||
void transition_to_rolling (bool forward);
|
||||
|
||||
void toggle_enable_group_edit ();
|
||||
void set_enable_group_edit (bool enabled);
|
||||
/* NOTE: these functions assume that the "pixel" coordinate is
|
||||
in canvas coordinates. These coordinates already take into
|
||||
account any scrolling offsets.
|
||||
|
|
@ -1506,7 +1508,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
bool _stationary_playhead;
|
||||
/// true if we are in fullscreen mode
|
||||
bool _maximised;
|
||||
|
||||
/// true if we have group edit enabled
|
||||
bool _enable_group_edit;
|
||||
|
||||
TempoLines* tempo_lines;
|
||||
|
||||
ArdourCanvas::Container* global_rect_group;
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ Editor::register_actions ()
|
|||
reg_sens (editor_actions, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun(*this, &Editor::select_all_tracks));
|
||||
reg_sens (editor_actions, "deselect-all", _("Select All/Deselect All"), sigc::mem_fun(*this, &Editor::deselect_all));
|
||||
reg_sens (editor_actions, "invert-selection", _("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection));
|
||||
toggle_reg_sens (editor_actions, "toggle-enable-group-edit", _("Enable Group Edit"), sigc::mem_fun (*this, &Editor::vertical_zoom_step_in));
|
||||
toggle_reg_sens (editor_actions, "toggle-enable-group-edit", _("Enable Group Edit"), sigc::mem_fun (*this, &Editor::toggle_enable_group_edit));
|
||||
|
||||
reg_sens (editor_actions, "select-all-after-edit-cursor", _("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true));
|
||||
reg_sens (editor_actions, "alternate-select-all-after-edit-cursor", _("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true));
|
||||
|
|
@ -1758,7 +1758,24 @@ Editor::parameter_changed (std::string p)
|
|||
tact->set_active (s);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (p == "enable-group-edit") {
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-enable-group-edit"));
|
||||
|
||||
if (_session) {
|
||||
|
||||
bool s = _session->config.get_enable_group_edit ();
|
||||
_enable_group_edit = s;
|
||||
|
||||
if (act) {
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
|
||||
if (tact->get_active () != s) {
|
||||
tact->set_active (s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ CONFIG_VARIABLE (bool, use_region_fades, "use-region-fades", true)
|
|||
CONFIG_VARIABLE (bool, show_region_fades, "show-region-fades", true)
|
||||
CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
|
||||
CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
|
||||
CONFIG_VARIABLE (bool, enable_group_edit, "enable-group-edit", false)
|
||||
CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
|
||||
CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
|
||||
CONFIG_VARIABLE (bool, auto_input, "auto-input", true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue