Skip to content

Commit

Permalink
Fix crash when undoing note delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
drobilla committed Jan 12, 2015
1 parent 1df6931 commit 4438263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions gtk2_ardour/midi_region_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ MidiRegionView::redisplay_model()

} else {

add_note (note, visible);
cne = add_note (note, visible);
}

set<boost::shared_ptr<NoteType> >::iterator it;
Expand Down Expand Up @@ -1794,7 +1794,7 @@ MidiRegionView::update_hit (Hit* ev, bool update_ghost_regions)
* notes, and resolve_note should be called when the corresponding note off
* event arrives, to properly display the note.
*/
void
NoteBase*
MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
{
NoteBase* event = 0;
Expand Down Expand Up @@ -1852,6 +1852,7 @@ MidiRegionView::add_note(const boost::shared_ptr<NoteType> note, bool visible)
MidiStreamView* const view = mtv->midi_view();

view->update_note_range (note->note());
return event;
}

void
Expand Down
2 changes: 1 addition & 1 deletion gtk2_ardour/midi_region_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class MidiRegionView : public RegionView

GhostRegion* add_ghost (TimeAxisView&);

void add_note(const boost::shared_ptr<NoteType> note, bool visible);
NoteBase* add_note(const boost::shared_ptr<NoteType> note, bool visible);
void resolve_note(uint8_t note_num, Evoral::Beats end_time);

void cut_copy_clear (Editing::CutCopyOp);
Expand Down

0 comments on commit 4438263

Please sign in to comment.