mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MidiLogger Demo: Avoid redrawing when no new messages have been received
This commit is contained in:
parent
420167f3ec
commit
6b8d07a0f6
1 changed files with 3 additions and 0 deletions
|
|
@ -80,6 +80,9 @@ public:
|
|||
template <typename It>
|
||||
void addMessages (It begin, It end)
|
||||
{
|
||||
if (begin == end)
|
||||
return;
|
||||
|
||||
const auto numNewMessages = (int) std::distance (begin, end);
|
||||
const auto numToAdd = juce::jmin (numToStore, numNewMessages);
|
||||
const auto numToRemove = jmax (0, (int) messages.size() + numToAdd - numToStore);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue