mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 20:56:28 +01:00
Small cleanup.
git-svn-id: svn://localhost/ardour2/branches/3.0@5574 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
09eee1bb7c
commit
27feb19897
1 changed files with 5 additions and 10 deletions
|
|
@ -722,7 +722,6 @@ RegionMoveDrag::motion (GdkEvent* event, bool first_move)
|
||||||
void
|
void
|
||||||
RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
|
RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
|
||||||
{
|
{
|
||||||
bool nocommit = true;
|
|
||||||
vector<RegionView*> copies;
|
vector<RegionView*> copies;
|
||||||
boost::shared_ptr<Diskstream> ds;
|
boost::shared_ptr<Diskstream> ds;
|
||||||
boost::shared_ptr<Playlist> from_playlist;
|
boost::shared_ptr<Playlist> from_playlist;
|
||||||
|
|
@ -739,11 +738,9 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
|
||||||
|
|
||||||
if (!movement_occurred) {
|
if (!movement_occurred) {
|
||||||
/* just a click */
|
/* just a click */
|
||||||
goto out;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nocommit = false;
|
|
||||||
|
|
||||||
if (Config->get_edit_mode() == Splice && !_editor->pre_drag_region_selection.empty()) {
|
if (Config->get_edit_mode() == Splice && !_editor->pre_drag_region_selection.empty()) {
|
||||||
_editor->selection->set (_editor->pre_drag_region_selection);
|
_editor->selection->set (_editor->pre_drag_region_selection);
|
||||||
_editor->pre_drag_region_selection.clear ();
|
_editor->pre_drag_region_selection.clear ();
|
||||||
|
|
@ -970,13 +967,11 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (!nocommit) {
|
for (set<boost::shared_ptr<Playlist> >::iterator p = modified_playlists.begin(); p != modified_playlists.end(); ++p) {
|
||||||
for (set<boost::shared_ptr<Playlist> >::iterator p = modified_playlists.begin(); p != modified_playlists.end(); ++p) {
|
_editor->session->add_command (new MementoCommand<Playlist>(*(*p), 0, &(*p)->get_state()));
|
||||||
_editor->session->add_command (new MementoCommand<Playlist>(*(*p), 0, &(*p)->get_state()));
|
|
||||||
}
|
|
||||||
|
|
||||||
_editor->commit_reversible_command ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_editor->commit_reversible_command ();
|
||||||
|
|
||||||
for (vector<RegionView*>::iterator x = copies.begin(); x != copies.end(); ++x) {
|
for (vector<RegionView*>::iterator x = copies.begin(); x != copies.end(); ++x) {
|
||||||
delete *x;
|
delete *x;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue