diff options
author | Felipe Heidrich <fheidric> | 2003-07-25 21:33:05 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2003-07-25 21:33:05 +0000 |
commit | a680de579a9583e7c36ebcafd256338e3341975b (patch) | |
tree | e01d4b28fb9f653b5d868ad4ee392c005464f93f /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java | |
parent | 3f6ca0ad18fe5709164b5e577725e5de2362e94d (diff) | |
download | eclipse.platform.swt-a680de579a9583e7c36ebcafd256338e3341975b.tar.gz eclipse.platform.swt-a680de579a9583e7c36ebcafd256338e3341975b.tar.xz eclipse.platform.swt-a680de579a9583e7c36ebcafd256338e3341975b.zip |
part of 40152
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 1cc680d549..1c425a4f79 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -328,7 +328,7 @@ public void deselect (int [] indices) { OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<indices.length; i++) { int index = indices [i]; - if (index < 0 || index > count) continue; + if (index < 0 || index > count - 1) continue; OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_unselect_iter (selection, iter); } @@ -1083,7 +1083,7 @@ public void select (int [] indices) { OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); for (int i=0; i<indices.length; i++) { int index = indices [i]; - if (index < 0 || index > count) continue; + if (index < 0 || index > count - 1) continue; OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index); OS.gtk_tree_selection_select_iter (selection, iter); if ((style & SWT.SINGLE) != 0) { |