_note_group->raise_to_top();
PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys));
- Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&MidiRegionView::parameter_changed, this, _1), gui_context());
+ Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&MidiRegionView::parameter_changed, this, _1), gui_context());
connect_to_diskstream ();
- SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), ui_bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
+ SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), boost::bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
}
MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv,
connect_to_diskstream ();
- SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), ui_bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
+ SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), boost::bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
}
void
PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys));
CanvasNoteEvent::CanvasNoteEventDeleted.connect (note_delete_connection, MISSING_INVALIDATOR,
- ui_bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1),
+ boost::bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1),
gui_context());
if (wfd) {
sigc::mem_fun(this, &MidiRegionView::midi_patch_settings_changed));
trackview.editor().SnapChanged.connect(snap_changed_connection, invalidator(*this),
- ui_bind(&MidiRegionView::snap_changed, this),
+ boost::bind (&MidiRegionView::snap_changed, this),
gui_context());
- Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&MidiRegionView::parameter_changed, this, _1), gui_context());
+ Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&MidiRegionView::parameter_changed, this, _1), gui_context());
connect_to_diskstream ();
- SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), ui_bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
+ SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), boost::bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
}
const boost::shared_ptr<ARDOUR::MidiRegion>
{
midi_view()->midi_track()->DataRecorded.connect(
*this, invalidator(*this),
- ui_bind(&MidiRegionView::data_recorded, this, _1),
+ boost::bind (&MidiRegionView::data_recorded, this, _1),
gui_context());
}
MidiRegionView::enter_notify (GdkEventCrossing* ev)
{
trackview.editor().MouseModeChanged.connect (
- _mouse_mode_connection, invalidator (*this), ui_bind (&MidiRegionView::mouse_mode_changed, this), gui_context ()
+ _mouse_mode_connection, invalidator (*this), boost::bind (&MidiRegionView::mouse_mode_changed, this), gui_context ()
);
if (trackview.editor().current_mouse_mode() == MouseDraw && _mouse_state != AddDragging) {
ghost->set_duration (_region->length() / samples_per_unit);
ghosts.push_back (ghost);
- GhostRegion::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RegionView::remove_ghost, this, _1), gui_context());
+ GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RegionView::remove_ghost, this, _1), gui_context());
return ghost;
}
framepos_t ref_point = source_beats_to_absolute_frames ((*(_selection.begin()))->note()->time());
framepos_t unused;
- framepos_t distance;
+ framecnt_t distance;
if (trackview.editor().snap_mode() == Editing::SnapOff) {
MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, bool can_set_cursor)
{
Editor* editor = dynamic_cast<Editor*>(&trackview.editor());
+ Editing::MouseMode mm = editor->current_mouse_mode();
+ bool trimmable = (mm == MouseObject || mm == MouseTimeFX || mm == MouseDraw);
- if (x_fraction > 0.0 && x_fraction < 0.2) {
+ if (trimmable && x_fraction > 0.0 && x_fraction < 0.2) {
editor->set_canvas_cursor (editor->cursors()->left_side_trim);
- } else if (x_fraction >= 0.8 && x_fraction < 1.0) {
+ } else if (trimmable && x_fraction >= 0.8 && x_fraction < 1.0) {
editor->set_canvas_cursor (editor->cursors()->right_side_trim);
} else {
if (pre_enter_cursor && can_set_cursor) {
Evoral::MusicalTime end_point = 0;
duration = (*mcb.notes().rbegin())->end_time() - (*mcb.notes().begin())->time();
- paste_pos_beats = region_frames_to_region_beats (pos - _region->position());
+ paste_pos_beats = absolute_frames_to_source_beats (pos);
beat_delta = (*mcb.notes().begin())->time() - paste_pos_beats;
paste_pos_beats = 0;
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("Paste extended region from %1 to %2\n", region_end, end_frame));
_region->clear_changes ();
- _region->set_length (end_frame);
+ _region->set_length (end_frame - _region->position());
trackview.session()->add_command (new StatefulDiffCommand (_region));
}