Scintilla uses a -1 index to unselect, we need to catch that.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2003-02-05 23:30:36 +00:00
parent debc914bdc
commit 895066d8c8
2 changed files with 12 additions and 2 deletions

View File

@ -815,7 +815,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;

View File

@ -815,7 +815,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;