13
0

further rationalization of the editor. after a split, ardour was switching the tool to object mode. this is the only place were ardour switched the tool for the user. that has been removed. Delete operation should not depend on the mouse mode, but rather the existence of selections. this solves the problem where you have selected regions in smart mode, but cant delete them because the mouse is in the top half (fange mode) of a track

This commit is contained in:
Ben Loftis 2014-07-05 18:27:29 -05:00
parent b091fb8ee7
commit 62c3638a42

View File

@ -2789,7 +2789,6 @@ Editor::separate_regions_between (const TimeSelection& ts)
if (in_command) {
selection->set (new_selection);
set_mouse_mode (MouseObject);
commit_reversible_command ();
}
@ -3726,23 +3725,8 @@ Editor::copy ()
bool
Editor::can_cut_copy () const
{
switch (effective_mouse_mode()) {
case MouseObject:
if (!selection->regions.empty() || !selection->points.empty()) {
if (!selection->time.empty() || !selection->regions.empty() || !selection->points.empty())
return true;
}
break;
case MouseRange:
if (!selection->time.empty()) {
return true;
}
break;
default:
break;
}
return false;
}
@ -3821,8 +3805,6 @@ Editor::cut_copy (CutCopyOp op)
bool did_edit = false;
switch (effective_mouse_mode()) {
case MouseGain:
if (!selection->points.empty()) {
begin_reversible_command (opname + _(" points"));
did_edit = true;
@ -3830,12 +3812,7 @@ Editor::cut_copy (CutCopyOp op)
if (op == Cut || op == Delete) {
selection->clear_points ();
}
}
break;
case MouseObject:
if (!selection->regions.empty() || !selection->points.empty()) {
} else if (!selection->regions.empty() || !selection->points.empty()) {
string thing_name;
@ -3865,11 +3842,7 @@ Editor::cut_copy (CutCopyOp op)
selection->clear_points ();
}
}
}
break;
case MouseRange:
if (selection->time.empty()) {
} else if (selection->time.empty()) {
framepos_t start, end;
/* no time selection, see if we can get an edit range
and use that.
@ -3877,8 +3850,7 @@ Editor::cut_copy (CutCopyOp op)
if (get_edit_op_range (start, end)) {
selection->set (start, end);
}
}
if (!selection->time.empty()) {
} else if (!selection->time.empty()) {
begin_reversible_command (opname + _(" range"));
did_edit = true;
@ -3888,11 +3860,6 @@ Editor::cut_copy (CutCopyOp op)
selection->clear_time ();
}
}
break;
default:
break;
}
if (did_edit) {
commit_reversible_command ();