fix timeline type use in brush dragging

This commit is contained in:
Paul Davis 2021-07-04 09:42:13 -06:00
parent 90264e1d0d
commit 6a71f9988e
1 changed files with 4 additions and 5 deletions

View File

@ -760,12 +760,11 @@ RegionBrushDrag::motion (GdkEvent* event, bool first_move)
_editor->begin_reversible_command (_("Region brush drag"));
_already_pasted.insert(_primary->region()->position());
} else {
MusicSample snapped (0, 0);
snapped.sample = adjusted_current_sample(event, false);
timepos_t snapped (adjusted_current_time (event, false));
_editor->snap_to (snapped, RoundDownAlways, SnapToGrid_Scaled, false);
if(_already_pasted.find(snapped.sample) == _already_pasted.end()) {
_editor->mouse_brush_insert_region (_primary, snapped.sample);
_already_pasted.insert(snapped.sample);
if(_already_pasted.find(snapped) == _already_pasted.end()) {
_editor->mouse_brush_insert_region (_primary, snapped);
_already_pasted.insert(snapped);
}
}
}