reapack

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

commit 8f8cf084716d3e539853ef4ef42fe5bab201f32e
parent efe5412b1e3854dfe3fdc83bea6df453fcfde5f8
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 21 Aug 2016 20:11:33 -0400

listview: avoid emitting onActivate if there is no selection

when double clicking at the very bottom of the header on OS X,
currentIndex() would return -1

Diffstat:
Msrc/listview.cpp | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/listview.cpp b/src/listview.cpp @@ -345,10 +345,8 @@ bool ListView::onContextMenu(HWND dialog, int x, int y) void ListView::handleDoubleClick() { - const int index = itemUnderMouse(); - // user double clicked on an item - if(index > -1) + if(itemUnderMouse() > -1 && currentIndex() > -1) m_onActivate(); }