From 6d7e7d60b52320238f0086e92f8ee5cbc2eed4bc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 5 Feb 2003 23:30:36 +0000 Subject: [PATCH] Scintilla uses a -1 index to unselect, we need to catch that. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/PlatWX.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 940712c0ee..d80aef709f 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -831,7 +831,12 @@ int ListBox::Length() { } void ListBox::Select(int n) { - GETLB(id)->SetSelection(n); + bool select = TRUE; + if (n == -1) { + n = 0; + select = FALSE; + } + GETLB(id)->SetSelection(n, select); #ifdef __WXGTK__ if (n > 4) n = n - 4;