start-range and finish-range should graphically show the range being created. also add bindings for comma and period in addition to existing bindings which require a numpad. the old ones are now alternates. all primary functionality should appear on the qwerrty, and the numpad should be considered an ergonomic redundant alternative if you have one
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
<accelerator action='toggle-edit-mode'/>
|
||||
<accelerator action='toggle-midi-input-active'/>
|
||||
<accelerator action='escape'/>
|
||||
|
||||
<accelerator action='alt-start-range'/>
|
||||
<accelerator action='alt-finish-range'/>
|
||||
|
||||
#ifdef GTKOSX
|
||||
<accelerator action='Quit'/>
|
||||
#endif
|
||||
@@ -191,7 +195,6 @@
|
||||
<menuitem action='move-range-end-to-next-region-boundary'/>
|
||||
<menuitem action='start-range'/>
|
||||
<menuitem action='finish-range'/>
|
||||
<menuitem action='finish-add-range'/>
|
||||
<separator/>
|
||||
<menuitem action='select-next-route'/>
|
||||
<menuitem action='select-prev-route'/>
|
||||
|
||||
@@ -4546,11 +4546,8 @@ Editor::get_regions_from_selection_and_edit_point ()
|
||||
|
||||
if (_edit_point == EditAtMouse && entered_regionview && !selection->regions.contains (entered_regionview)) {
|
||||
regions.add (entered_regionview);
|
||||
} else {
|
||||
regions = selection->regions;
|
||||
}
|
||||
|
||||
|
||||
if (regions.empty() && _edit_point != EditAtMouse) {
|
||||
TrackViewList tracks = selection->tracks;
|
||||
|
||||
|
||||
@@ -333,7 +333,11 @@ Editor::register_actions ()
|
||||
|
||||
reg_sens (editor_actions, "start-range", _("Start Range"), sigc::mem_fun(*this, &Editor::keyboard_selection_begin));
|
||||
reg_sens (editor_actions, "finish-range", _("Finish Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), false));
|
||||
reg_sens (editor_actions, "finish-add-range", _("Finish Add Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), true));
|
||||
|
||||
reg_sens (editor_actions, "alt-start-range", _("Start Range"), sigc::mem_fun(*this, &Editor::keyboard_selection_begin));
|
||||
reg_sens (editor_actions, "alt-finish-range", _("Finish Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), false));
|
||||
|
||||
// reg_sens (editor_actions, "finish-add-range", _("Finish Add Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), true));
|
||||
|
||||
reg_sens (
|
||||
editor_actions,
|
||||
|
||||
@@ -37,7 +37,77 @@
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
|
||||
void
|
||||
Editor::keyboard_selection_finish (bool add)
|
||||
{
|
||||
if (_session) {
|
||||
|
||||
framepos_t start = selection->time.start();
|
||||
framepos_t end;
|
||||
|
||||
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
|
||||
end = _session->audible_frame();
|
||||
} else {
|
||||
end = get_preferred_edit_position();
|
||||
}
|
||||
|
||||
//snap the selection start/end
|
||||
snap_to(start);
|
||||
|
||||
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
|
||||
if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
|
||||
select_all_tracks();
|
||||
|
||||
selection->set (start, end);
|
||||
|
||||
//if session is playing a range, cancel that
|
||||
// if (_session->get_play_range())
|
||||
// _session->request_cancel_play_range();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::keyboard_selection_begin ()
|
||||
{
|
||||
if (_session) {
|
||||
|
||||
framepos_t start;
|
||||
framepos_t end = selection->time.end_frame(); //0 if no current selection
|
||||
|
||||
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
|
||||
start = _session->audible_frame();
|
||||
} else {
|
||||
start = get_preferred_edit_position();
|
||||
}
|
||||
|
||||
//snap the selection start/end
|
||||
snap_to(start);
|
||||
|
||||
//if there's not already a sensible selection endpoint, go "forever"
|
||||
if ( start > end ) {
|
||||
end = max_framepos;
|
||||
}
|
||||
|
||||
//if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
|
||||
if ( selection->tracks.empty() )
|
||||
select_all_tracks();
|
||||
|
||||
selection->set (start, end);
|
||||
|
||||
//if session is playing a range, cancel that
|
||||
if (_session->get_play_range())
|
||||
_session->request_transport_speed ( 1.0 );
|
||||
|
||||
//if join playhead, locate to the newly selected start
|
||||
// if ( !_session->transport_rolling() && Config->get_join_play_range() )
|
||||
// _session->request_cancel_play_range();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void
|
||||
Editor::keyboard_selection_finish (bool add)
|
||||
{
|
||||
@@ -82,7 +152,7 @@ Editor::keyboard_selection_begin ()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void
|
||||
Editor::keyboard_paste ()
|
||||
|
||||
@@ -1378,17 +1378,7 @@ Editor::select_all (Selection::Operation op)
|
||||
{
|
||||
list<Selectable *> touched;
|
||||
|
||||
TrackViewList ts;
|
||||
|
||||
if (selection->tracks.empty()) {
|
||||
if (entered_track) {
|
||||
ts.push_back (entered_track);
|
||||
} else {
|
||||
ts = track_views;
|
||||
}
|
||||
} else {
|
||||
ts = selection->tracks;
|
||||
}
|
||||
TrackViewList ts = track_views;
|
||||
|
||||
if (_internal_editing) {
|
||||
|
||||
@@ -1418,8 +1408,10 @@ Editor::select_all (Selection::Operation op)
|
||||
continue;
|
||||
}
|
||||
(*iter)->get_selectables (0, max_framepos, 0, DBL_MAX, touched);
|
||||
selection->add (*iter);
|
||||
}
|
||||
|
||||
|
||||
begin_reversible_command (_("select all"));
|
||||
switch (op) {
|
||||
case Selection::Add:
|
||||
|
||||
@@ -275,10 +275,10 @@ This mode provides many different operations on both regions and control points,
|
||||
@rop|Region/nudge-forward|KP_Add|nudge forward
|
||||
@-group|Editor/nudge-next-forward|<@PRIMARY@>KP_Add|some text
|
||||
|
||||
@-group|Editor/start-range|<@PRIMARY@>KP_Down|some text
|
||||
|
||||
@-group|Editor/finish-range|<@PRIMARY@>KP_Up|some text
|
||||
@-group|Editor/finish-add-range|<@TERTIARY@><@PRIMARY@>KP_Up|some text
|
||||
@-group|Editor/start-range|comma|some text
|
||||
@-group|Editor/finish-range|period|some text
|
||||
@-group|Editor/alt-start-range|<@PRIMARY@>KP_Down|some text
|
||||
@-group|Editor/alt-finish-range|<@PRIMARY@>KP_Up|some text
|
||||
|
||||
@markers|Editor/add-location-from-playhead|KP_Enter|add mark at playhead
|
||||
@wvis|Transport/focus-on-clock|KP_Divide|focus on main clock
|
||||
|
||||
Reference in New Issue
Block a user