#include "ardour/session.h"
#include "ardour/dB.h"
#include "ardour/region_factory.h"
+#include "ardour/operations.h"
+
#include "editor.h"
#include "i18n.h"
#include "keyboard.h"
_drags.clear ();
- _editor->set_follow_playhead (_old_follow_playhead);
+ _editor->set_follow_playhead (_old_follow_playhead, false);
_ending = false;
}
if (_x_constrained) {
_editor->begin_reversible_command (_("fixed time region drag"));
} else {
- _editor->begin_reversible_command (_("region drag"));
+ _editor->begin_reversible_command (Operations::region_drag);
}
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ) {
for (PlaylistSet::const_iterator i = playlists.begin(); i != playlists.end(); ++i) {
StatefulDiffCommand* c = new StatefulDiffCommand (*i);
if (!c->empty()) {
- _editor->session()->add_command (new StatefulDiffCommand (*i));
+ _editor->session()->add_command (c);
} else {
delete c;
}
boost::shared_ptr<Playlist> playlist = dest_rtv->playlist();
- _editor->begin_reversible_command (_("insert region"));
+ _editor->begin_reversible_command (Operations::insert_region);
playlist->clear_changes ();
playlist->add_region (_primary->region (), _last_frame_position);
_editor->session()->add_command (new StatefulDiffCommand (playlist));
Selection::Operation op = ArdourKeyboard::selection_type (event->button.state);
- bool committed;
_editor->begin_reversible_command (_("rubberband selection"));
if (grab_frame() < last_pointer_frame()) {
- committed = _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op, false);
+ _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op, false);
} else {
- committed = _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false);
- }
-
- if (!committed) {
- _editor->commit_reversible_command ();
+ _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false);
}
+ _editor->commit_reversible_command ();
} else {
if (!getenv("ARDOUR_SAE")) {
_editor->selection->clear_tracks();