#include "ardour/dB.h"
#include "ardour/location.h"
#include "ardour/midi_region.h"
+#include "ardour/midi_track.h"
#include "ardour/operations.h"
#include "ardour/playlist_factory.h"
#include "ardour/quantize.h"
return;
}
- Location *location = _session->locations()->first_location_after (playhead_cursor->current_frame);
+ framepos_t pos = _session->locations()->first_mark_after (playhead_cursor->current_frame);
- if (location) {
- _session->request_locate (location->start(), _session->transport_rolling());
- } else {
- _session->request_locate (_session->current_end_frame());
+ if (pos < 0) {
+ return;
}
+
+ _session->request_locate (pos, _session->transport_rolling());
}
void
return;
}
- Location *location = _session->locations()->first_location_before (playhead_cursor->current_frame);
+ framepos_t pos = _session->locations()->first_mark_before (playhead_cursor->current_frame);
- if (location) {
- _session->request_locate (location->start(), _session->transport_rolling());
- } else {
- _session->goto_start ();
+ if (pos < 0) {
+ return;
}
+
+ _session->request_locate (pos, _session->transport_rolling());
}
void
d.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
d.set_size_request (300, -1);
- d.set_position (Gtk::WIN_POS_MOUSE);
entry.set_text (rs.front()->region()->name());
entry.select_region (0, -1);
if (rtv && rtv->track() && replace && enable_processing && !rtv->track()->bounceable (rtv->track()->main_outs(), false)) {
MessageDialog d (
_("You can't perform this operation because the processing of the signal "
- "will cause one or more of the tracks will end up with a region with more channels than this track has inputs.\n\n"
+ "will cause one or more of the tracks to end up with a region with more channels than this track has inputs.\n\n"
"You can do this without processing, which is a different operation.")
);
d.set_title (_("Cannot bounce"));
/* we only want to cut regions if some are selected */
if (!selection->regions.empty()) {
- rs = get_regions_from_selection ();
+ rs = selection->regions;
}
switch (effective_mouse_mode()) {
_session->commit_reversible_command ();
}
+void
+Editor::toggle_region_video_lock ()
+{
+ if (_ignore_region_action) {
+ return;
+ }
+
+ RegionSelection rs = get_regions_from_selection_and_entered ();
+
+ if (!_session || rs.empty()) {
+ return;
+ }
+
+ _session->begin_reversible_command (_("Toggle Video Lock"));
+
+ for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
+ (*i)->region()->clear_changes ();
+ (*i)->region()->set_video_locked (!(*i)->region()->video_locked());
+ _session->add_command (new StatefulDiffCommand ((*i)->region()));
+ }
+
+ _session->commit_reversible_command ();
+}
+
void
Editor::toggle_region_lock_style ()
{