diff options
author | David Robillard <d@drobilla.net> | 2011-06-01 17:00:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-01 17:00:29 +0000 |
commit | ed626628b54e67dd9621c08d82a42afaed00c7ac (patch) | |
tree | cf621db4c44f07f75a6e6a3fb7f572cd2c3622cd /gtk2_ardour/midi_region_view.cc | |
parent | a473d630eb165272992e90f8d854b1d66ec0be63 (diff) |
Delete trailing whitespace
git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 250 |
1 files changed, 125 insertions, 125 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index d7ae77def5..c2b3462bd2 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -221,7 +221,7 @@ MidiRegionView::init (Gdk::Color const & basic_color, bool wfd) { PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys)); - CanvasNoteEvent::CanvasNoteEventDeleted.connect (note_delete_connection, MISSING_INVALIDATOR, + CanvasNoteEvent::CanvasNoteEventDeleted.connect (note_delete_connection, MISSING_INVALIDATOR, ui_bind (&MidiRegionView::maybe_remove_deleted_note_from_selection, this, _1), gui_context()); @@ -296,7 +296,7 @@ MidiRegionView::canvas_event(GdkEvent* ev) default: break; } - + if (!trackview.editor().internal_editing()) { return false; } @@ -319,7 +319,7 @@ MidiRegionView::canvas_event(GdkEvent* ev) case GDK_BUTTON_RELEASE: return button_release (&ev->button); - + case GDK_ENTER_NOTIFY: return enter_notify (&ev->crossing); @@ -329,7 +329,7 @@ MidiRegionView::canvas_event(GdkEvent* ev) case GDK_MOTION_NOTIFY: return motion (&ev->motion); - default: + default: break; } @@ -364,7 +364,7 @@ bool MidiRegionView::leave_notify (GdkEventCrossing*) { _mouse_mode_connection.disconnect (); - + trackview.editor().verbose_cursor()->hide (); remove_ghost_note (); return false; @@ -390,17 +390,17 @@ MidiRegionView::button_press (GdkEventButton* ev) _last_x = ev->x; _last_y = ev->y; - + group->w2i (_last_x, _last_y); - + if (_mouse_state != SelectTouchDragging) { - + _pressed_button = ev->button; _mouse_state = Pressed; - + return true; } - + _pressed_button = ev->button; return true; @@ -418,36 +418,36 @@ MidiRegionView::button_release (GdkEventButton* ev) event_x = ev->x; event_y = ev->y; - + group->w2i(event_x, event_y); group->ungrab(ev->time); - + event_frame = trackview.editor().pixel_to_frame(event_x); switch (_mouse_state) { - case Pressed: // Clicked + case Pressed: // Clicked switch (trackview.editor().current_mouse_mode()) { case MouseObject: case MouseTimeFX: { clear_selection(); - + if (Keyboard::is_insert_note_event(ev)){ - + double event_x, event_y; - + event_x = ev->x; event_y = ev->y; group->w2i(event_x, event_y); bool success; Evoral::MusicalTime beats = trackview.editor().get_grid_type_as_beats (success, trackview.editor().pixel_to_frame (event_x)); - + if (!success) { beats = 1; } - + create_note_at (event_x, event_y, beats, true); } @@ -457,24 +457,24 @@ MidiRegionView::button_release (GdkEventButton* ev) { bool success; Evoral::MusicalTime beats = trackview.editor().get_grid_type_as_beats (success, trackview.editor().pixel_to_frame (event_x)); - + if (!success) { beats = 1; } - + create_note_at (event_x, event_y, beats, true); - + break; } default: break; } - + _mouse_state = None; break; - + case SelectRectDragging: // Select drag done - + _mouse_state = None; delete _drag_rect; _drag_rect = 0; @@ -483,9 +483,9 @@ MidiRegionView::button_release (GdkEventButton* ev) case AddDragging: // Add drag done _mouse_state = None; - + if (Keyboard::is_insert_note_event(ev) || trackview.editor().current_mouse_mode() == MouseRange){ - + if (_drag_rect->property_x2() > _drag_rect->property_x1() + 2) { const double x = _drag_rect->property_x1(); @@ -499,7 +499,7 @@ MidiRegionView::button_release (GdkEventButton* ev) _drag_rect = 0; create_ghost_note (ev->x, ev->y); - + default: break; } @@ -520,22 +520,22 @@ MidiRegionView::motion (GdkEventMotion* ev) // convert event_x to global frame event_frame = snap_pixel_to_frame (event_x); - if (!_ghost_note && trackview.editor().current_mouse_mode() != MouseRange - && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()) + if (!_ghost_note && trackview.editor().current_mouse_mode() != MouseRange + && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()) && _mouse_state != AddDragging){ - + create_ghost_note (ev->x, ev->y); } - else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange + else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())){ - + update_ghost_note (ev->x, ev->y); } else if (_ghost_note && trackview.editor().current_mouse_mode() != MouseRange){ - + delete _ghost_note; _ghost_note = 0; - + trackview.editor().verbose_cursor()->hide (); } else if (_ghost_note && trackview.editor().current_mouse_mode() == MouseRange) { @@ -543,26 +543,26 @@ MidiRegionView::motion (GdkEventMotion* ev) } /* any motion immediately hides velocity text that may have been visible */ - + for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) { (*i)->hide_velocity (); } switch (_mouse_state) { case Pressed: // Maybe start a drag, if we've moved a bit - + if (fabs (event_x - _last_x) < 1 && fabs (event_y - _last_y) < 1) { /* no appreciable movement since the button was pressed */ return false; } // Select drag start - if (_pressed_button == 1 && trackview.editor().current_mouse_mode() == MouseObject + if (_pressed_button == 1 && trackview.editor().current_mouse_mode() == MouseObject && !Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) { - + group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, Gdk::Cursor(Gdk::FLEUR), ev->time); - + _last_x = event_x; _last_y = event_y; _drag_start_x = event_x; @@ -587,10 +587,10 @@ MidiRegionView::motion (GdkEventMotion* ev) delete _ghost_note; _ghost_note = 0; - + group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, Gdk::Cursor(Gdk::FLEUR), ev->time); - + _last_x = event_x; _last_y = event_y; _drag_start_x = event_x; @@ -611,10 +611,10 @@ MidiRegionView::motion (GdkEventMotion* ev) _mouse_state = AddDragging; if (_ghost_note){ - + delete _ghost_note; _ghost_note = 0; - + trackview.editor().verbose_cursor()->hide (); } @@ -640,7 +640,7 @@ MidiRegionView::motion (GdkEventMotion* ev) } if (_drag_rect) { - + if (event_x > _drag_start_x){ _drag_rect->property_x2() = event_x; } @@ -650,7 +650,7 @@ MidiRegionView::motion (GdkEventMotion* ev) } if (_drag_rect && _mouse_state == SelectRectDragging) { - + if (event_y > _drag_start_y){ _drag_rect->property_y2() = event_y; } @@ -685,95 +685,95 @@ MidiRegionView::scroll (GdkEventScroll* ev) trackview.editor().verbose_cursor()->hide (); bool fine = !Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier); - + if (ev->direction == GDK_SCROLL_UP) { change_velocities (true, fine, false); } else if (ev->direction == GDK_SCROLL_DOWN) { change_velocities (false, fine, false); - } + } return true; } bool MidiRegionView::key_press (GdkEventKey* ev) -{ +{ /* since GTK bindings are generally activated on press, and since detectable auto-repeat is the name of the game and only sends repeated presses, carry out key actions at key press, not release. */ - + if (ev->keyval == GDK_Alt_L || ev->keyval == GDK_Alt_R){ _mouse_state = SelectTouchDragging; return true; - + } else if (ev->keyval == GDK_Escape) { clear_selection(); _mouse_state = None; - + } else if (ev->keyval == GDK_comma || ev->keyval == GDK_period) { - + bool start = (ev->keyval == GDK_comma); bool end = (ev->keyval == GDK_period); bool shorter = Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier); bool fine = Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier); - + change_note_lengths (fine, shorter, 0.0, start, end); - + return true; - + } else if (ev->keyval == GDK_Delete) { - + delete_selection(); return true; - + } else if (ev->keyval == GDK_Tab) { - + if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) { goto_previous_note (); } else { goto_next_note (); } return true; - + } else if (ev->keyval == GDK_Up) { - + bool allow_smush = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier); bool fine = !Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier); - + if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) { change_velocities (true, fine, allow_smush); } else { transpose (true, fine, allow_smush); } return true; - + } else if (ev->keyval == GDK_Down) { - + bool allow_smush = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier); bool fine = !Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier); - + if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) { change_velocities (false, fine, allow_smush); } else { transpose (false, fine, allow_smush); } return true; - + } else if (ev->keyval == GDK_Left) { - + nudge_notes (false); return true; - + } else if (ev->keyval == GDK_Right) { - + nudge_notes (true); return true; - + } else if (ev->keyval == GDK_Control_L) { return true; } - + return false; } @@ -870,7 +870,7 @@ void MidiRegionView::display_model(boost::shared_ptr<MidiModel> model) { _model = model; - + content_connection.disconnect (); _model->ContentsChanged.connect (content_connection, invalidator (*this), boost::bind (&MidiRegionView::redisplay_model, this), gui_context()); @@ -952,10 +952,10 @@ MidiRegionView::apply_diff (bool as_subcommand) } else { _model->apply_command (*trackview.session(), _note_diff_command); } - + _note_diff_command = 0; midi_view()->midi_track()->playlist_modified(); - + if (add_or_remove) { _marked_for_selection.clear(); } @@ -1081,7 +1081,7 @@ MidiRegionView::redisplay_model() _patch_changes.clear(); _sys_exes.clear(); - + display_sysexes(); display_patch_changes (); @@ -1117,7 +1117,7 @@ MidiRegionView::display_patch_changes_on_channel (uint8_t channel) if ((*i)->channel() != channel) { continue; } - + MIDI::Name::PatchPrimaryKey patch_key ((*i)->bank_msb (), (*i)->bank_lsb (), (*i)->program ()); boost::shared_ptr<MIDI::Name::Patch> patch = @@ -1218,7 +1218,7 @@ MidiRegionView::reset_width_dependent_items (double pixel_width) if (_enable_display) { redisplay_model(); } - + move_step_edit_cursor (_step_edit_cursor_position); set_step_edit_cursor_width (_step_edit_cursor_width); } @@ -1238,7 +1238,7 @@ MidiRegionView::set_height (double height) if (name_pixbuf) { name_pixbuf->raise_to_top(); } - + for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) { (*x)->set_height (midi_stream_view()->contents_height()); } @@ -1398,7 +1398,7 @@ MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note) } RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview); - + if (!route_ui || !route_ui->midi_track()) { return; } @@ -1416,7 +1416,7 @@ MidiRegionView::play_midi_chord (vector<boost::shared_ptr<NoteType> > notes) } RouteUI* route_ui = dynamic_cast<RouteUI*> (&trackview); - + if (!route_ui || !route_ui->midi_track()) { return; } @@ -1465,13 +1465,13 @@ MidiRegionView::update_note (CanvasNote* ev, bool update_ghost_regions) ev->property_x1() = x; ev->property_y1() = y1; - + if (note->length() > 0) { ev->property_x2() = note_endpixel; } else { ev->property_x2() = trackview.editor().frame_to_pixel(_region->length()); } - + ev->property_y2() = y1 + floor(midi_stream_view()->note_height()); if (note->length() == 0) { @@ -1573,7 +1573,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible) if (_marked_for_velocity.find(note) != _marked_for_velocity.end()) { event->show_velocity(); } - + event->on_channel_selection_change(_last_channel_selection); _events.push_back(event); @@ -1583,7 +1583,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible) event->hide (); } } - + MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview); MidiStreamView* const view = mtv->midi_view(); @@ -1604,7 +1604,7 @@ MidiRegionView::step_add_note (uint8_t channel, uint8_t number, uint8_t velocity if (end_frame > region_end) { _region->set_length (end_frame - _region->position()); } - + MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview); MidiStreamView* const view = mtv->midi_view(); @@ -1662,7 +1662,7 @@ MidiRegionView::get_patch_key_at (Evoral::MusicalTime time, uint8_t channel, MID while (i != _model->patch_changes().end() && (*i)->channel() != channel) { ++i; } - + if (i != _model->patch_changes().end()) { key.msb = (*i)->bank_msb (); key.lsb = (*i)->bank_lsb (); @@ -1670,7 +1670,7 @@ MidiRegionView::get_patch_key_at (Evoral::MusicalTime time, uint8_t channel, MID } else { key.msb = key.lsb = key.program_number = 0; } - + assert (key.is_sane()); } @@ -1679,7 +1679,7 @@ void MidiRegionView::change_patch_change (CanvasPatchChange& pc, const MIDI::Name::PatchPrimaryKey& new_patch) { MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("alter patch change")); - + if (pc.patch()->program() != new_patch.program_number) { c->change_program (pc.patch (), new_patch.program_number); } @@ -1699,7 +1699,7 @@ void MidiRegionView::change_patch_change (MidiModel::PatchChangePtr old_change, const Evoral::PatchChange<Evoral::MusicalTime> & new_change) { MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("alter patch change")); - + if (old_change->time() != new_change.time()) { c->change_time (old_change, new_change.time()); } @@ -1707,7 +1707,7 @@ MidiRegionView::change_patch_change (MidiModel::PatchChangePtr old_change, const if (old_change->channel() != new_change.channel()) { c->change_channel (old_change, new_change.channel()); } - + if (old_change->program() != new_change.program()) { c->change_program (old_change, new_change.program()); } @@ -1731,16 +1731,16 @@ void MidiRegionView::add_patch_change (framecnt_t t, Evoral::PatchChange<Evoral::MusicalTime> const & patch) { MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview); - + MidiModel::PatchChangeDiffCommand* c = _model->new_patch_change_diff_command (_("add patch change")); c->add (MidiModel::PatchChangePtr ( new Evoral::PatchChange<Evoral::MusicalTime> ( frames_to_beats (t + midi_region()->start()), mtv->get_channel_for_add(), patch.program(), patch.bank() ) )); - + _model->apply_command (*trackview.session(), c); - + _patch_changes.clear (); display_patch_changes (); } @@ -1766,7 +1766,7 @@ MidiRegionView::delete_patch_change (CanvasPatchChange* pc) _patch_changes.clear (); display_patch_changes (); } - + void MidiRegionView::previous_patch (CanvasPatchChange& patch) { @@ -1795,7 +1795,7 @@ MidiRegionView::maybe_remove_deleted_note_from_selection (CanvasNoteEvent* cne) if (_selection.empty()) { return; } - + if (_selection.erase (cne) > 0) { cerr << "Erased a CNE from selection\n"; } @@ -1936,12 +1936,12 @@ MidiRegionView::select_matching_notes (uint8_t notenum, uint16_t channel_mask, b if (select) { if ((cne = find_canvas_note (note)) != 0) { - // extend is false because we've taken care of it, + // extend is false because we've taken care of it, // since it extends by time range, not pitch. note_selected (cne, add, false); } } - + add = true; // we need to add all remaining matching notes, even if the passed in value was false (for "set") } @@ -2341,7 +2341,7 @@ MidiRegionView::begin_resizing (bool /*at_front*/) /** Update resizing notes while user drags. * @param primary `primary' note for the drag; ie the one that is used as the reference in non-relative mode. * @param at_front which end of the note (true == note on, false == note off) - * @param delta_x change in mouse position since the start of the drag + * @param delta_x change in mouse position since the start of the drag * @param relative true if relative resizing is taking place, false if absolute resizing. This only makes * a difference when multiple notes are being resized; in relative mode, each note's length is changed by the * amount of the drag. In non-relative mode, all selected notes are set to have the same start or end point @@ -2384,7 +2384,7 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at beats = snap_pixel_to_frame (current_x); beats = frames_to_beats (beats); - + double len; if (at_front) { @@ -2395,7 +2395,7 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at len = 0; } } else { - if (beats >= canvas_note->note()->time()) { + if (beats >= canvas_note->note()->time()) { len = beats - canvas_note->note()->time(); } else { len = 0; @@ -2490,8 +2490,8 @@ MidiRegionView::change_note_velocity(CanvasNoteEvent* event, int8_t velocity, bo new_velocity = velocity; } - event->set_selected (event->selected()); // change color - + event->set_selected (event->selected()); // change color + note_diff_add_change (event, MidiModel::NoteDiffCommand::Velocity, new_velocity); } @@ -2647,10 +2647,10 @@ MidiRegionView::change_velocities (bool up, bool fine, bool allow_smush) } apply_diff(); - + if (!_selection.empty()) { char buf[24]; - snprintf (buf, sizeof (buf), "Vel %d", + snprintf (buf, sizeof (buf), "Vel %d", (int) (*_selection.begin())->note()->velocity()); show_verbose_cursor (buf, 10, 10); } @@ -2757,7 +2757,7 @@ MidiRegionView::nudge_notes (bool forward) framepos_t distance; if (trackview.editor().snap_mode() == Editing::SnapOff) { - + /* grid is off - use nudge distance */ distance = trackview.editor().get_nudge_distance (ref_point, unused); @@ -2821,7 +2821,7 @@ void MidiRegionView::note_entered(ArdourCanvas::CanvasNoteEvent* ev) { Editor* editor = dynamic_cast<Editor*>(&trackview.editor()); - + _pre_enter_cursor = editor->get_canvas_cursor (); if (_mouse_state == SelectTouchDragging) { @@ -2866,7 +2866,7 @@ void MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, bool can_set_cursor) { Editor* editor = dynamic_cast<Editor*>(&trackview.editor()); - + if (x_fraction > 0.0 && x_fraction < 0.25) { editor->set_canvas_cursor (editor->cursors()->left_side_trim); } else if (x_fraction >= 0.75 && x_fraction < 1.0) { @@ -2896,7 +2896,7 @@ MidiRegionView::set_frame_color() } else { f = fill_color; } - + if (!rect_visible) { f = UINT_RGBA_CHANGE_A (f, 0); } @@ -2957,7 +2957,7 @@ MidiRegionView::cut_copy_clear (Editing::CutCopyOp op) if (op != Copy) { start_note_diff_command(); - + for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) { switch (op) { case Copy: @@ -2968,7 +2968,7 @@ MidiRegionView::cut_copy_clear (Editing::CutCopyOp op) break; } } - + apply_diff(); } } @@ -3018,7 +3018,7 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb) (*mcb.notes().rbegin())->end_time(), duration, pos, _region->position(), paste_pos_beats, beat_delta)); - + clear_selection (); for (int n = 0; n < (int) times; ++n) { @@ -3052,7 +3052,7 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb) } apply_diff (true); - + trackview.session()->commit_reversible_command (); } @@ -3145,7 +3145,7 @@ MidiRegionView::selection_as_notelist (Notes& selected, bool allow_all_if_none_s had_selected = true; } } - + if (allow_all_if_none_selected && !had_selected) { for (Events::iterator i = _events.begin(); i != _events.end(); ++i) { selected.insert ((*i)->note()); @@ -3157,10 +3157,10 @@ void MidiRegionView::update_ghost_note (double x, double y) { MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview); - + _last_ghost_x = x; _last_ghost_y = y; - + _note_group->w2i (x, y); framepos_t const f = snap_pixel_to_frame (x); @@ -3170,9 +3170,9 @@ MidiRegionView::update_ghost_note (double x, double y) if (!success) { beats = 1; } - + double length = frames_to_beats (snap_frame_to_frame (f + beats_to_frames (beats)) - f); - + _ghost_note->note()->set_time (frames_to_beats (f + _region->start())); _ghost_note->note()->set_length (length); _ghost_note->note()->set_note (midi_stream_view()->y_to_note (y)); @@ -3208,7 +3208,7 @@ MidiRegionView::snap_changed () if (!_ghost_note) { return; } - + create_ghost_note (_last_ghost_x, _last_ghost_y); } @@ -3251,7 +3251,7 @@ MidiRegionView::maybe_select_by_position (GdkEventButton* ev, double /*x*/, doub PublicEditor& editor (trackview.editor()); editor.get_selection().add (this); } -} +} void MidiRegionView::color_handler () @@ -3332,7 +3332,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt /* we aren't actively being recorded to */ return; } - + boost::shared_ptr<MidiSource> src = w.lock (); if (!src || src != midi_region()->midi_source()) { /* recorded data was not destined for our source */ @@ -3343,7 +3343,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt BeatsFramesConverter converter (trackview.session()->tempo_map(), mtv->midi_track()->get_capture_start_frame (0)); framepos_t back = max_framepos; - + for (MidiBuffer::iterator i = buf->begin(); i != buf->end(); ++i) { Evoral::MIDIEvent<MidiBuffer::TimeType> const ev (*i, false); assert (ev.buffer ()); @@ -3364,7 +3364,7 @@ MidiRegionView::data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::weak_pt } else if (ev.note() > _current_range_max) { midi_stream_view()->apply_note_range (_current_range_min, ev.note(), true); } - + } else if (ev.type() == MIDI_CMD_NOTE_OFF) { resolve_note (ev.note (), time_beats); } @@ -3415,12 +3415,12 @@ void MidiRegionView::show_verbose_cursor (boost::shared_ptr<NoteType> n) const { char buf[24]; - snprintf (buf, sizeof (buf), "%s (%d) Chn %d\nVel %d", - Evoral::midi_note_name (n->note()).c_str(), + snprintf (buf, sizeof (buf), "%s (%d) Chn %d\nVel %d", + Evoral::midi_note_name (n->note()).c_str(), (int) n->note (), (int) n->channel() + 1, (int) n->velocity()); - + show_verbose_cursor (buf, 10, 20); } @@ -3435,7 +3435,7 @@ MidiRegionView::show_verbose_cursor (string const & text, double xoffset, double wy += yoffset; /* Flip the cursor above the mouse pointer if it would overlap the bottom of the canvas */ - + double x1, y1, x2, y2; trackview.editor().verbose_cursor()->canvas_item()->get_bounds (x1, y1, x2, y2); |