Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 299379 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java (+19 lines)
Lines 327-332 Link Here
327
327
328
		// Hook up special logic to synch up the Tab Items
328
		// Hook up special logic to synch up the Tab Items
329
		hookTabControllerLogic(stack, part, cti);
329
		hookTabControllerLogic(stack, part, cti);
330
331
		// Re-ensure that the activeChild == the selected tab
332
		if (stack.getActiveChild() != null) {
333
			CTabItem selCTI = findItemForPart(stack, stack.getActiveChild());
334
			if (selCTI != null && selCTI != ctf.getSelection())
335
				ctf.setSelection(selCTI);
336
		}
330
	}
337
	}
331
338
332
	private int calcIndexFor(MElementContainer<MUIElement> stack,
339
	private int calcIndexFor(MElementContainer<MUIElement> stack,
Lines 397-402 Link Here
397
			oldItem.setControl(null); // prevent the widget from being disposed
404
			oldItem.setControl(null); // prevent the widget from being disposed
398
			oldItem.dispose();
405
			oldItem.dispose();
399
		}
406
		}
407
408
		// Check if we have to reset the currently active child for the stack
409
		if (parentElement.getActiveChild() == child) {
410
			// HACK!! we'll reset to the first element for now but really should
411
			// be based on the activation chain
412
			if (parentElement.getChildren().size() == 0) {
413
				parentElement.setActiveChild(null);
414
			} else {
415
				parentElement
416
						.setActiveChild(parentElement.getChildren().get(0));
417
			}
418
		}
400
	}
419
	}
401
420
402
	@Override
421
	@Override

Return to bug 299379