]> git.saurik.com Git - wxWidgets.git/commitdiff
Scintilla uses a -1 index to unselect, we need to catch that.
authorRobin Dunn <robin@alldunn.com>
Wed, 5 Feb 2003 23:30:36 +0000 (23:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 5 Feb 2003 23:30:36 +0000 (23:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/PlatWX.cpp
src/stc/PlatWX.cpp

index 54ba588dd19e910a22f2d20d4a44d595db66d1aa..fbf1faf2a370d9db55d4eb62d7bfadcdd8298f63 100644 (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;
index 54ba588dd19e910a22f2d20d4a44d595db66d1aa..fbf1faf2a370d9db55d4eb62d7bfadcdd8298f63 100644 (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;