mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
more fixes for the intersection of Locked Edit mode and copy-dragging
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3165 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fec2a96cec
commit
cd0cf5def7
1 changed files with 13 additions and 5 deletions
|
|
@ -3059,10 +3059,16 @@ Editor::possibly_copy_regions_during_grab (GdkEvent* event)
|
|||
return;
|
||||
}
|
||||
|
||||
/* reset selection to new regionviews */
|
||||
/* reset selection to new regionviews. This will not set selection visual status for
|
||||
these regionviews since they don't belong to a track, so do that by hand too.
|
||||
*/
|
||||
|
||||
selection->set (new_regionviews);
|
||||
|
||||
for (vector<RegionView*>::iterator i = new_regionviews.begin(); i != new_regionviews.end(); ++i) {
|
||||
(*i)->set_selected (true);
|
||||
}
|
||||
|
||||
/* reset drag_info data to reflect the fact that we are dragging the copies */
|
||||
|
||||
drag_info.data = new_regionviews.front();
|
||||
|
|
@ -3395,7 +3401,8 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
// printf ("3: pending_region_position= %lu %lu\n", pending_region_position, drag_info.last_frame_position );
|
||||
|
||||
bool x_move_allowed = ( !drag_info.x_constrained && (Config->get_edit_mode() != Lock)) || ( drag_info.x_constrained && (Config->get_edit_mode() == Lock)) ;
|
||||
bool x_move_allowed = ( drag_info.copy || !drag_info.x_constrained && (Config->get_edit_mode() != Lock)) || ( drag_info.x_constrained && (Config->get_edit_mode() == Lock)) ;
|
||||
|
||||
if ( pending_region_position != drag_info.last_frame_position && x_move_allowed ) {
|
||||
|
||||
/* now compute the canvas unit distance we need to move the regionview
|
||||
|
|
@ -3618,7 +3625,6 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
RouteTimeAxisView* tvp1;
|
||||
boost::shared_ptr<Diskstream> ds;
|
||||
boost::shared_ptr<Playlist> from_playlist;
|
||||
bool axis_motion;
|
||||
|
||||
/* first_move is set to false if the regionview has been moved in the
|
||||
motion handler.
|
||||
|
|
@ -3757,6 +3763,9 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
rv->hide_region_editor();
|
||||
rv->fake_set_opaque (false);
|
||||
|
||||
/* remove the region from the old playlist */
|
||||
|
||||
|
||||
session->add_command (new MementoCommand<Playlist>(*from_playlist, &from_playlist->get_state(), 0));
|
||||
from_playlist->remove_region ((rv->region()));
|
||||
session->add_command (new MementoCommand<Playlist>(*from_playlist, 0, &from_playlist->get_state()));
|
||||
|
|
@ -3819,7 +3828,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
if (drag_info.copy) {
|
||||
selection->clear_regions();
|
||||
}
|
||||
|
||||
|
||||
for (list<RegionView*>::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||
|
||||
rv = (*i);
|
||||
|
|
@ -3896,7 +3905,6 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
}
|
||||
|
||||
out:
|
||||
|
||||
if (!nocommit) {
|
||||
commit_reversible_command ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue