reapack

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

commit 2188cc6523d0cbef4e69a62d427ff466a8db2302
parent bf414319ed00d1e46da04dcf6ca368c115e7084f
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 27 Aug 2017 19:40:54 -0700

browser: fix performance degradation caused by e39b7f20e6466c3719425b00a941b5121e3eba75

Doing actions on the entire package list got very slow.

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

diff --git a/src/browser.cpp b/src/browser.cpp @@ -752,13 +752,9 @@ void Browser::updateAction(const int index) m_list->removeRow(index); updateDisplayLabel(); } - else { + else m_list->row(index)->setCell(0, make_autostring(entry->displayState())); - if(m_list->sortColumn() == 0) - m_list->sort(); - } - if(m_actions.empty()) disable(m_applyBtn); else @@ -781,6 +777,11 @@ void Browser::selectionDo(const function<void (int)> &func) offset++; lastSize = newSize; } + + // re-sort here rather than doing it once per entry after updating the + // status cell in updateAction + if(m_list->sortColumn() == 0) + m_list->sort(); } auto Browser::currentView() const -> View