mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 07:26:32 +01:00
make split obey edit point preference
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2619 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0031a1424f
commit
e64e5970d2
2 changed files with 12 additions and 9 deletions
|
|
@ -3973,32 +3973,36 @@ nframes64_t
|
|||
Editor::get_preferred_edit_position() const
|
||||
{
|
||||
bool ignored;
|
||||
nframes64_t where;
|
||||
nframes64_t where = 0;
|
||||
|
||||
// XXX EDIT CURSOR used to sync with edit cursor clock
|
||||
|
||||
switch (_edit_point) {
|
||||
case EditAtPlayhead:
|
||||
return playhead_cursor->current_frame;
|
||||
where = session->audible_frame();
|
||||
break;
|
||||
|
||||
case EditAtSelectedMarker:
|
||||
if (!selection->markers.empty()) {
|
||||
bool whocares;
|
||||
Location* loc = find_location_from_marker (selection->markers.front(), whocares);
|
||||
if (loc) {
|
||||
return loc->start();
|
||||
where = loc->start();
|
||||
}
|
||||
}
|
||||
/* fallthru */
|
||||
|
||||
default:
|
||||
case EditAtMouse:
|
||||
if (mouse_frame (where, ignored)) {
|
||||
return where;
|
||||
}
|
||||
if (!mouse_frame (where, ignored)) {
|
||||
/* XXX not right */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
// XXX MAKE ME SNAP
|
||||
// snap_to (where);
|
||||
return where;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -132,8 +132,7 @@ Editor::kbd_do_split (GdkEvent* ev)
|
|||
{
|
||||
if (entered_regionview) {
|
||||
|
||||
nframes_t where = event_frame (ev);
|
||||
snap_to (where);
|
||||
nframes_t where = get_preferred_edit_position();
|
||||
|
||||
if (selection->regions.contains (entered_regionview)) {
|
||||
split_regions_at (where, selection->regions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue