Small cleanup.

git-svn-id: svn://localhost/ardour2/branches/3.0@5574 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-08-24 02:10:46 +00:00
parent 09eee1bb7c
commit 27feb19897

View file

@ -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;