edit operations should depend on the existence of an explicit range, NOT the mouse mode. this produces less confusion to the user. For an edit (such as delete) the selection should be based on this priority: explicit range selection, ojbect (region) selection, and then implicit range ( i.e. mouse-to-marker)
git-svn-id: svn://localhost/ardour2/branches/3.0@13563 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
613021bff1
commit
f77763020b
|
@ -3262,15 +3262,9 @@ Editor::duplicate_range (bool with_dialog)
|
|||
{
|
||||
float times = 1.0f;
|
||||
|
||||
if (mouse_mode == MouseRange) {
|
||||
if (selection->time.length() == 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
||||
|
||||
if (mouse_mode != MouseRange && rs.empty()) {
|
||||
if ( selection->time.length() == 0 && rs.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3317,7 +3311,7 @@ Editor::duplicate_range (bool with_dialog)
|
|||
times = adjustment.get_value();
|
||||
}
|
||||
|
||||
if (mouse_mode == MouseRange) {
|
||||
if (selection->time.length() != 0) {
|
||||
duplicate_selection (times);
|
||||
} else {
|
||||
duplicate_some_regions (rs, times);
|
||||
|
|
|
@ -1175,11 +1175,9 @@ Editor::marker_menu_set_from_selection ()
|
|||
|
||||
/* if range selection use first to last */
|
||||
|
||||
if (mouse_mode == Editing::MouseRange) {
|
||||
if (!selection->time.empty()) {
|
||||
l->set_start (selection->time.start());
|
||||
l->set_end (selection->time.end_frame());
|
||||
}
|
||||
if (!selection->time.empty()) {
|
||||
l->set_start (selection->time.start());
|
||||
l->set_end (selection->time.end_frame());
|
||||
}
|
||||
else {
|
||||
if (!selection->regions.empty()) {
|
||||
|
|
|
@ -2725,7 +2725,7 @@ Editor::separate_region_from_selection ()
|
|||
returns a single range.
|
||||
*/
|
||||
|
||||
if (mouse_mode == MouseRange && !selection->time.empty()) {
|
||||
if (!selection->time.empty()) {
|
||||
|
||||
separate_regions_between (selection->time);
|
||||
|
||||
|
|
|
@ -1817,9 +1817,9 @@ Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
|
|||
framepos_t m;
|
||||
bool ignored;
|
||||
|
||||
/* in range mode, use any existing selection */
|
||||
/* if an explicit range exists, use it */
|
||||
|
||||
if (mouse_mode == MouseRange && !selection->time.empty()) {
|
||||
if (!selection->time.empty()) {
|
||||
/* we know that these are ordered */
|
||||
start = selection->time.start();
|
||||
end = selection->time.end_frame();
|
||||
|
|
Loading…
Reference in New Issue