summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSteve Northover <steve>2003-12-09 17:54:18 +0000
committerSteve Northover <steve>2003-12-09 17:54:18 +0000
commit632489633baf3198c4fcd87bb8b0cb955b1415fc (patch)
tree56a1c2200fd34a306d423c224b65da0e6870d35e /bundles
parent80438231d96b0f010fd7630d8db612a2294304d4 (diff)
downloadeclipse.platform.swt-632489633baf3198c4fcd87bb8b0cb955b1415fc.tar.gz
eclipse.platform.swt-632489633baf3198c4fcd87bb8b0cb955b1415fc.tar.xz
eclipse.platform.swt-632489633baf3198c4fcd87bb8b0cb955b1415fc.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index 9b94cd7d3e..9539ec2333 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -615,8 +615,7 @@ void setForegroundColor (GdkColor color) {
*/
public void setSelection (int index) {
checkWidget ();
- int count = getItemCount ();
- if (!(0 <= index && index < count)) return;
+ if (!(0 <= index && index < getItemCount ())) return;
setSelection (index, false);
}
@@ -666,11 +665,11 @@ public void setSelection (TabItem [] items) {
if (items == null) error (SWT.ERROR_NULL_ARGUMENT);
if (items.length == 0) {
setSelection (-1, false);
- return;
- }
- for (int i=items.length-1; i>=0; --i) {
- int index = indexOf (items [i]);
- if (index != -1) setSelection (index, false);
+ } else {
+ for (int i=items.length-1; i>=0; --i) {
+ int index = indexOf (items [i]);
+ if (index != -1) setSelection (index, false);
+ }
}
}