reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 0e172bc73d5f071f6f8d55d40727dbf600e0f734
parent f114102df35b299ab6c9dd832894093b9f83da95
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Tue, 24 Oct 2017 02:36:34 -0400

browser: avoid repopulating the whole list when applying an asynchronous transaction

Diffstat:
Msrc/browser.cpp | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/browser.cpp b/src/browser.cpp @@ -818,7 +818,11 @@ bool Browser::apply() if(!tx) return false; - for(Entry *entry : m_actions) { + std::list<Entry *> actions; + swap(actions, m_actions); + disable(m_applyBtn); + + for(Entry *entry : actions) { if(entry->target) { const Version *target = *entry->target; @@ -835,13 +839,11 @@ bool Browser::apply() } } - m_actions.clear(); - disable(m_applyBtn); - if(!tx->runTasks()) { // this is an asynchronous transaction // update the state column right away to give visual feedback - fillList(); + for(int i = 0, count = m_list->rowCount(); i < count; ++i) + updateAction(i); } return true;