reapack

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

commit ede5960f5d9125a8af08961e2f2dd06044d041c2
parent 855912fcf9187430d311618829f74c9c36ee173c
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Thu,  5 May 2016 20:58:40 -0400

browser: make "Clear queued actions" reset pin status as well

Diffstat:
Msrc/browser.cpp | 17++++++++++++++++-
Msrc/browser.hpp | 1+
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/browser.cpp b/src/browser.cpp @@ -152,7 +152,7 @@ void Browser::onCommand(const int id, const int event) about(m_currentIndex); break; case ACTION_RESET_ALL: - selectionDo(bind(&Browser::resetTarget, this, arg::_1)); + selectionDo(bind(&Browser::resetActions, this, arg::_1)); break; case ACTION_REFRESH: refresh(true); @@ -803,6 +803,21 @@ void Browser::resetTarget(const int index) updateAction(index); } +void Browser::resetActions(const int index) +{ + Entry *entry = getEntry(index); + if(!m_actions.count(entry)) + return; + + if(entry->target) + entry->target = boost::none; + if(entry->pin) + entry->pin = boost::none; + + m_actions.erase(entry); + updateAction(index); +} + void Browser::updateAction(const int index) { Entry *entry = getEntry(index); diff --git a/src/browser.hpp b/src/browser.hpp @@ -112,6 +112,7 @@ private: void toggleFiltered(Package::Type); void setTarget(const int index, const Version *, bool toggle = true); void resetTarget(int index); + void resetActions(int index); void updateAction(const int index); void selectionDo(const std::function<void (int)> &); Tab currentTab() const;