reapack

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

commit 4dee328be69f114333e69a321252f72fdfdaee82
parent 6abb0bd33af227bf8d3c17c0be6aa3de89806906
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 21 Aug 2016 01:48:38 -0400

about: refactor link selection

Diffstat:
Msrc/about.cpp | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -70,8 +70,6 @@ void About::onCommand(const int id, int) default: if(m_links.count(id)) selectLink(id); - else if(m_links.count(id >> 8)) - openLink(m_links[id >> 8][id & 0xff]); else if(m_delegate) m_delegate->onCommand(id); break; @@ -208,7 +206,11 @@ void About::selectLink(const int ctrl) RECT rect; GetWindowRect(getControl(ctrl), &rect); - menu.show(rect.left, rect.bottom - 1, handle()); + + const int choice = menu.show(rect.left, rect.bottom - 1, handle()); + + if(choice >> 8 == ctrl) + openLink(links[choice & 0xff]); } void About::openLink(const Link *link)