File tree Expand file tree Collapse file tree
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/custom Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,6 +446,7 @@ public void setControl (Control control) {
446446 if (control .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
447447 if (control .parent != parent ) error (SWT .ERROR_INVALID_PARENT );
448448 }
449+ System .out .println ("Ctab setControl " + control + " " + control .parent + " " + parent );
449450 if (this .control != null && this .control .isDisposed ()) {
450451 this .control = null ;
451452 }
@@ -461,7 +462,9 @@ public void setControl (Control control) {
461462 if (clientArea .height <= 0 || clientArea .width <= 0 ) {
462463 System .out .println ("client area has trouble" );
463464 } else {
464- newControl .setBounds (clientArea );
465+ if (this .isSelected ){
466+ newControl .setBounds (clientArea );
467+ }
465468 newControl .setVisible (true );
466469 }
467470// if (newControl != null) {
@@ -612,6 +615,7 @@ public void run() {
612615 e .time = display .getLastEventTime ();
613616 e .item = CTabItem .this ;
614617 e .doit = true ;
618+ CTabFolder parent = CTabItem .this .parent ;
615619 for (int j = 0 ; j < parent .folderListeners .length ; j ++) {
616620 CTabFolder2Listener listener = parent .folderListeners [j ];
617621 listener .close (e );
You can’t perform that action at this time.
0 commit comments