mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Eliminate a ton of unnecessary complete redrawing in MIDI stream views:
Only resize vertically (don't reaload model) on range changes. Keep track of range in model while loading (writing to model), rather than double display MIDI regions to find out. Don't go crazy and chew CPU blinking around and doing nothing on initial show of MIDI track context menu. Change radio 'full range' and 'contents range' menu items to non-radio actions that just set the range appropriately. Fix crashes on some esoteric case of control data I can't figure out, but fixed anyway, so I guess it all worked out well in the end for everybody. git-svn-id: svn://localhost/ardour2/branches/3.0@3794 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
234d56a8c4
commit
ffaf827d93
9 changed files with 230 additions and 134 deletions
|
|
@ -314,6 +314,8 @@ Sequence::Sequence(const TypeMap& type_map, size_t size)
|
|||
, _end_iter(*this, DBL_MAX)
|
||||
, _next_read(UINT32_MAX)
|
||||
, _percussive(false)
|
||||
, _lowest_note(127)
|
||||
, _highest_note(0)
|
||||
{
|
||||
debugout << "Sequence (size " << size << ") constructed: " << this << endl;
|
||||
assert(_end_iter._is_end);
|
||||
|
|
@ -568,6 +570,11 @@ Sequence::append_note_on_unlocked(uint8_t chan, EventTime time, uint8_t note_num
|
|||
assert(_writing);
|
||||
_edited = true;
|
||||
|
||||
if (note_num < _lowest_note)
|
||||
_lowest_note = note_num;
|
||||
if (note_num > _highest_note)
|
||||
_highest_note = note_num;
|
||||
|
||||
boost::shared_ptr<Note> new_note(new Note(chan, time, 0, note_num, velocity));
|
||||
_notes.push_back(new_note);
|
||||
if (!_percussive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue