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:
@@ -815,7 +815,12 @@ int ListBox::Length() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ListBox::Select(int n) {
|
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__
|
#ifdef __WXGTK__
|
||||||
if (n > 4)
|
if (n > 4)
|
||||||
n = n - 4;
|
n = n - 4;
|
||||||
|
@@ -815,7 +815,12 @@ int ListBox::Length() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ListBox::Select(int n) {
|
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__
|
#ifdef __WXGTK__
|
||||||
if (n > 4)
|
if (n > 4)
|
||||||
n = n - 4;
|
n = n - 4;
|
||||||
|
Reference in New Issue
Block a user