, _pdropzone (0)
, _ddropzone (0)
{
- _last_position = MusicFrame (_primary->region()->position(), 0);
DEBUG_TRACE (DEBUG::Drags, "New RegionMotionDrag\n");
}
void
RegionCreateDrag::motion (GdkEvent* event, bool first_move)
{
+
if (first_move) {
_editor->begin_reversible_command (_("create region"));
_region = add_midi_region (_view, false);
_view->playlist()->freeze ();
} else {
+
if (_region) {
framepos_t const f = adjusted_current_frame (event);
- if (f < grab_frame()) {
+ if (f <= grab_frame()) {
_region->set_initial_position (f);
}
a bit confusing as if a region starts 1 frame after a snap point, one cannot
place snapped notes at the start of the region.
*/
-
- framecnt_t const len = (framecnt_t) fabs ((double)(f - grab_frame () - 1));
- _region->set_length (len < 1 ? 1 : len, _editor->get_grid_music_divisions (event->button.state));
+ if (f != grab_frame()) {
+ framecnt_t const len = (framecnt_t) fabs ((double)(f - grab_frame () - 1));
+ _region->set_length (len < 1 ? 1 : len, _editor->get_grid_music_divisions (event->button.state));
+ }
}
}
}
vector<boost::shared_ptr<Playlist> > all_playlists;
_editor->session()->playlists->get (all_playlists);
for (vector<boost::shared_ptr<Playlist> >::iterator x = all_playlists.begin(); x != all_playlists.end(); ++x) {
+
if ((*x)->uses_source (rv->region()->source(0))) {
insert_result = _editor->motion_frozen_playlists.insert (*x);
if (insert_result.second) {
- pl->freeze();
+ (*x)->clear_owned_changes ();
+ (*x)->freeze();
}
+
}
}
}
}
- if (AudioEngine::instance()->connected()) {
+ if (AudioEngine::instance()->running()) {
/* do this only if we're the engine is connected
* because otherwise this request will never be
*/
s->request_suspend_timecode_transmission ();
- while (AudioEngine::instance()->connected() && !s->timecode_transmission_suspended ()) {
+ while (AudioEngine::instance()->running() && !s->timecode_transmission_suspended ()) {
/* twiddle our thumbs */
}
}