break;
}
+ /* catch up on selection of stripables (other selection state is lost
+ * when a session is closed
+ */
+
+ StripableList sl;
+ TrackViewList tl;
+ _session->get_stripables (sl);
+ for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) {
+ if ((*s)->presentation_info().selected()) {
+ RouteTimeAxisView* rtav = get_route_view_by_route_id ((*s)->id());
+ if (rtav) {
+ tl.push_back (rtav);
+ }
+ }
+ }
+ if (!tl.empty()) {
+ selection->set (tl);
+ }
+
/* register for undo history */
_session->register_with_memento_command_factory(id(), this);
_session->register_with_memento_command_factory(_selection_memento->id(), _selection_memento);
case SnapToBeatDiv4:
case SnapToBeatDiv3:
case SnapToBeatDiv2: {
- std::vector<TempoMap::BBTPoint> grid;
- compute_current_bbt_points (grid, leftmost_frame, leftmost_frame + current_page_samples());
- compute_bbt_ruler_scale (grid, leftmost_frame, leftmost_frame + current_page_samples());
- update_tempo_based_rulers (grid);
+ compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + current_page_samples());
+ update_tempo_based_rulers ();
break;
}
if the grid is snapped to bars, returns -1.
@param event_state the current keyboard modifier mask.
*/
-unsigned
+int32_t
Editor::get_grid_music_divisions (uint32_t event_state)
{
if (snap_mode() == Editing::SnapOff && !ArdourKeyboard::indicates_snap (event_state)) {
compute_fixed_ruler_scale ();
- std::vector<TempoMap::BBTPoint> grid;
- compute_current_bbt_points (grid, vc.time_origin, pending_visual_change.time_origin + current_page_samples());
- compute_bbt_ruler_scale (grid, vc.time_origin, pending_visual_change.time_origin + current_page_samples());
- update_tempo_based_rulers (grid);
+ compute_bbt_ruler_scale (vc.time_origin, pending_visual_change.time_origin + current_page_samples());
+ update_tempo_based_rulers ();
update_video_timeline();
}
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (rv);
if (mrv) {
- list<pair<PBD::ID const, list<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >::iterator rnote;
+ list<pair<PBD::ID const, list<Evoral::event_id_t> > >::iterator rnote;
for (rnote = selection->pending_midi_note_selection.begin(); rnote != selection->pending_midi_note_selection.end(); ++rnote) {
if (rv->region()->id () == (*rnote).first) {
mrv->select_notes ((*rnote).second);