if (_cursor == _editor->playhead_cursor) {
_editor->_dragging_playhead = true;
- if (_editor->session() && _was_rolling && _stop) {
- _editor->session()->request_stop ();
- }
+ Session* s = _editor->session ();
+
+ if (s) {
+ if (_was_rolling && _stop) {
+ s->request_stop ();
+ }
- if (_editor->session() && _editor->session()->is_auditioning()) {
- _editor->session()->cancel_audition ();
+ if (s->is_auditioning()) {
+ s->cancel_audition ();
+ }
+
+ s->request_suspend_timecode_transmission ();
+
+ if (s->timecode_transmission_suspended ()) {
+ nframes64_t const f = _editor->playhead_cursor->current_frame;
+ s->send_mmc_locate (f);
+ s->send_full_time_code (f);
+ }
}
}
_editor->show_verbose_time_cursor (_cursor->current_frame, 10);
- if (_editor->session() && _item == &_editor->playhead_cursor->canvas_item) {
+ Session* s = _editor->session ();
+ if (s && _item == &_editor->playhead_cursor->canvas_item && s->timecode_transmission_suspended ()) {
nframes64_t const f = _editor->playhead_cursor->current_frame;
- _editor->session()->send_mmc_locate (f);
- _editor->session()->send_full_time_code (f);
+ s->send_mmc_locate (f);
+ s->send_full_time_code (f);
}
motion (event, false);
if (_item == &_editor->playhead_cursor->canvas_item) {
- if (_editor->session()) {
- _editor->session()->request_locate (_editor->playhead_cursor->current_frame, _was_rolling);
+ Session* s = _editor->session ();
+ if (s) {
+ s->request_locate (_editor->playhead_cursor->current_frame, _was_rolling);
_editor->_pending_locate_request = true;
+ s->request_resume_timecode_transmission ();
}
}
}
void
CursorDrag::aborted ()
{
- _editor->_dragging_playhead = false;
+ if (_editor->_dragging_playhead) {
+ _editor->session()->request_resume_timecode_transmission ();
+ _editor->_dragging_playhead = false;
+ }
+
_cursor->set_position (adjusted_frame (grab_frame (), 0, false));
}
/* just a click */
- if ((event->type == GDK_BUTTON_RELEASE) && (event->button.button == 1) && Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
+ if (Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
_editor->reset_point_selection ();
}
_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);
+ committed = _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);
+ committed = _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false);
}
if (!committed) {
Gdk::Cursor* cursor = 0;
if (!_editor->temp_location) {
- _editor->temp_location = new Location;
+ _editor->temp_location = new Location (*_editor->session());
}
switch (_operation) {
flags = Location::IsRangeMarker;
_editor->range_bar_drag_rect->hide();
}
- newloc = new Location(_editor->temp_location->start(), _editor->temp_location->end(), rangename, (Location::Flags) flags);
+ newloc = new Location (
+ *_editor->session(), _editor->temp_location->start(), _editor->temp_location->end(), rangename, (Location::Flags) flags
+ );
+
_editor->session()->locations()->add (newloc, true);
XMLNode &after = _editor->session()->locations()->get_state();
_editor->session()->add_command(new MementoCommand<Locations>(*(_editor->session()->locations()), &before, &after));
switch (_editor->mouse_mode) {
case MouseObject:
/* find the two markers on either side and then make the selection from it */
- _editor->select_all_within (start, end, 0.0f, FLT_MAX, _editor->track_views, Selection::Set);
+ _editor->select_all_within (start, end, 0.0f, FLT_MAX, _editor->track_views, Selection::Set, false);
break;
case MouseRange:
region->move_selection (dx, dy);
char buf[12];
- snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (cnote->note()->note()).c_str(),
+ snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (cnote->note()->note() + drag_delta_note).c_str(),
(int) floor ((cnote->note()->note() + drag_delta_note)));
_editor->show_verbose_canvas_cursor_with (buf);
}