Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 414929 - New added toolbar has an incorrect position if there is invisible toolbar in last place
Summary: New added toolbar has an incorrect position if there is invisible toolbar in ...
Status: CLOSED DUPLICATE of bug 399401
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-13 01:24 EDT by Evgeniy Gil CLA
Modified: 2013-08-13 01:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***