Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 414929

Summary: New added toolbar has an incorrect position if there is invisible toolbar in last place
Product: [Eclipse Project] Platform Reporter: Evgeniy Gil <egil>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: krzysztof.daniel
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Evgeniy Gil CLA 2013-08-13 01:24:58 EDT
If there is an invisible toolbar in last place the new added toolbar will be positioned on the end of main toolbar instead of place that pointed by anchor

Steps to reproduce:
  1. create some toolbars with invisible one in last place
  2. create some anchor in the middle of these toolbars (e.g. "group.editor")
  3. create new toolbar dinamically that will be placed im place from step 2

Wrong behavior: Toolbar appears in the end position of main toolbar

The mistake in the methor PartRenderingEngine.fixZOrder():
 kids widgets should be tested not only on Control descendants but on Visisble property also

line 374: 
368                     if (kid == element) {
369 				if (prevCtrl != null)
370 					elementCtrl.moveBelow(prevCtrl);
371 				else
372 					elementCtrl.moveAbove(null);
373 				break;
374 			} else if (kid.getWidget() instanceof Control <b>&& kid.isVisible()</b>) {
375 				prevCtrl = (Control) kid.getWidget();
376 			}
Comment 1 Krzysztof Daniel CLA 2013-08-13 01:37:58 EDT

*** This bug has been marked as a duplicate of bug 399401 ***