bool is_start;
bool in_command = false;
+ const int32_t divisions = get_grid_music_divisions (0);
for (MarkerSelection::iterator i = selection->markers.begin(); i != selection->markers.end(); ++i) {
distance = next_distance;
}
if (max_framepos - distance > loc->start() + loc->length()) {
- loc->set_start (loc->start() + distance);
+ loc->set_start (loc->start() + distance, false, true, divisions);
} else {
- loc->set_start (max_framepos - loc->length());
+ loc->set_start (max_framepos - loc->length(), false, true, divisions);
}
} else {
distance = get_nudge_distance (loc->end(), next_distance);
distance = next_distance;
}
if (max_framepos - distance > loc->end()) {
- loc->set_end (loc->end() + distance);
+ loc->set_end (loc->end() + distance, false, true, divisions);
} else {
- loc->set_end (max_framepos);
+ loc->set_end (max_framepos, false, true, divisions);
}
if (loc->is_session_range()) {
_session->set_end_is_free (false);
distance = next_distance;
}
if (distance < loc->start()) {
- loc->set_start (loc->start() - distance);
+ loc->set_start (loc->start() - distance, false, true, get_grid_music_divisions(0));
} else {
- loc->set_start (0);
+ loc->set_start (0, false, true, get_grid_music_divisions(0));
}
} else {
distance = get_nudge_distance (loc->end(), next_distance);
}
if (distance < loc->end() - loc->length()) {
- loc->set_end (loc->end() - distance);
+ loc->set_end (loc->end() - distance, false, true, get_grid_music_divisions(0));
} else {
- loc->set_end (loc->length());
+ loc->set_end (loc->length(), false, true, get_grid_music_divisions(0));
}
if (loc->is_session_range()) {
_session->set_end_is_free (false);
return;
}
- loc->move_to (target);
+ loc->move_to (target, 0);
}
void
pos = track_frame_to_session_frame(pos, speed);
- loc->move_to (pos);
+ loc->move_to (pos, 0);
}
void
return;
}
- loc->move_to (pos);
+ loc->move_to (pos, 0);
}
void
return;
}
- loc->move_to (pos);
+ loc->move_to (pos, 0);
}
void
_session->request_locate (selection->markers.front()->position(), _session->transport_rolling());
} else {
+ const int32_t divisions = get_grid_music_divisions (0);
/* move selected markers to playhead */
for (MarkerSelection::iterator i = selection->markers.begin(); i != selection->markers.end(); ++i) {
Location* loc = find_location_from_marker (*i, ignored);
if (loc->is_mark()) {
- loc->set_start (playhead_cursor->current_frame ());
+ loc->set_start (playhead_cursor->current_frame (), false, true, divisions);
} else {
loc->set (playhead_cursor->current_frame (),
- playhead_cursor->current_frame () + loc->length());
+ playhead_cursor->current_frame () + loc->length(), true, divisions);
}
}
}
framepos_t end = selection->time[clicked_selection].end;
_session->locations()->next_available_name(rangename,"selection");
- Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
+ Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker, get_grid_music_divisions(0));
begin_reversible_command (_("add marker"));
if (!choose_new_marker_name(markername)) {
return;
}
- Location *location = new Location (*_session, where, where, markername, Location::IsMark);
+ Location *location = new Location (*_session, where, where, markername, Location::IsMark, get_grid_music_divisions (0));
begin_reversible_command (_("add marker"));
XMLNode &before = _session->locations()->get_state();
boost::shared_ptr<Region> region = (*i)->region ();
- Location *location = new Location (*_session, region->position(), region->last_frame(), region->name(), Location::IsRangeMarker);
+ Location *location = new Location (*_session, region->position(), region->last_frame(), region->name(), Location::IsRangeMarker, 0);
_session->locations()->add (location, true);
commit = true;
}
// single range spanning all selected
- Location *location = new Location (*_session, selection->regions.start(), selection->regions.end_frame(), markername, Location::IsRangeMarker);
+ Location *location = new Location (*_session, selection->regions.start(), selection->regions.end_frame(), markername, Location::IsRangeMarker, 0);
_session->locations()->add (location, true);
begin_reversible_command (_("add marker"));
return;
}
- _session->locations()->add (new Location (*_session, pos, 0, markername, Location::IsMark), true);
+ _session->locations()->add (new Location (*_session, pos, 0, markername, Location::IsMark, 0), true);
}
void
Location* loc = find_location_from_marker (selection->markers.front(), ignored);
if (loc) {
- loc->move_to (where);
+ loc->move_to (where, get_grid_music_divisions(0));
}
}
}
/* markers */
if (markers_too) {
bool moved = false;
+ const int32_t divisions = get_grid_music_divisions (0);
XMLNode& before (_session->locations()->get_state());
Locations::LocationList copy (_session->locations()->list());
if ((*i)->start() >= pos) {
// move end first, in case we're moving by more than the length of the range
if (!(*i)->is_mark()) {
- (*i)->set_end ((*i)->end() + frames);
+ (*i)->set_end ((*i)->end() + frames, false, true, divisions);
}
- (*i)->set_start ((*i)->start() + frames);
+ (*i)->set_start ((*i)->start() + frames, false, true, divisions);
moved = true;
}
}
}
+ const int32_t divisions = get_grid_music_divisions (0);
std::list<Location*> loc_kill_list;
/* markers */
// if we're removing more time than the length of the range
if ((*i)->start() >= pos && (*i)->start() < pos+frames) {
// start is within cut
- (*i)->set_start (pos); // bring the start marker to the beginning of the cut
+ (*i)->set_start (pos, false, true,divisions); // bring the start marker to the beginning of the cut
moved = true;
} else if ((*i)->start() >= pos+frames) {
// start (and thus entire range) lies beyond end of cut
- (*i)->set_start ((*i)->start() - frames); // slip the start marker back
+ (*i)->set_start ((*i)->start() - frames, false, true, divisions); // slip the start marker back
moved = true;
}
if ((*i)->end() >= pos && (*i)->end() < pos+frames) {
// end is inside cut
- (*i)->set_end (pos); // bring the end to the cut
+ (*i)->set_end (pos, false, true, divisions); // bring the end to the cut
moved = true;
} else if ((*i)->end() >= pos+frames) {
// end is beyond end of cut
- (*i)->set_end ((*i)->end() - frames); // slip the end marker back
+ (*i)->set_end ((*i)->end() - frames, false, true, divisions); // slip the end marker back
moved = true;
}
loc_kill_list.push_back(*i);
moved = true;
} else if ((*i)->start() >= pos) {
- (*i)->set_start ((*i)->start() -frames);
+ (*i)->set_start ((*i)->start() -frames, false, true, divisions);
moved = true;
}