aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Rolka2013-11-25 09:48:46 (EST)
committerGerrit Code Review @ Eclipse.org2013-12-02 10:22:45 (EST)
commitcf38dbb74abf87a193b4754b0274410dc105934e (patch)
treec4fb86720090ee3059ce7a36647500b5a7421b43
parent8cf9ee8a16a11b41054055198e3b100a8c74d1e6 (diff)
downloadeclipse.platform.ui-cf38dbb74abf87a193b4754b0274410dc105934e.zip
eclipse.platform.ui-cf38dbb74abf87a193b4754b0274410dc105934e.tar.gz
eclipse.platform.ui-cf38dbb74abf87a193b4754b0274410dc105934e.tar.bz2
Bug 410049 - [Perspectives] Complex Placeholderfolder construct does notrefs/changes/61/18561/7
get rendered Change-Id: Id5c3b99ab2a1d9590f58b4a2676c92d01acd6800 Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
index 6eed85f..a61095e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
@@ -591,12 +591,7 @@ public class ModeledPageLayout implements IPageLayout {
if (relTo.isToBeRendered() || toInsert.isToBeRendered()) {
// one of the items to be inserted should be rendered, render
// all parent elements as well
- MUIElement parent = psc.getParent();
- while (parent != null && !(parent instanceof MPerspective)) {
- parent.setToBeRendered(true);
- parent = parent.getParent();
- }
- psc.setToBeRendered(true);
+ resetToBeRenderedFlag(psc, true);
} else {
// no child elements need to be rendered, the parent part sash
// container does not need to be rendered either then
@@ -683,11 +678,20 @@ public class ModeledPageLayout implements IPageLayout {
stack.setSelectedElement(viewModel);
}
- if (visible) {
+ if (visible || viewModel.isToBeRendered()) {
// ensure that the parent is being rendered, it may have been a
// placeholder folder so its flag may actually be false
- refModel.setToBeRendered(true);
+ resetToBeRenderedFlag(viewModel, true);
}
}
}
+
+ private static void resetToBeRenderedFlag(MUIElement element, boolean toBeRendered) {
+ MUIElement parent = element.getParent();
+ while (parent != null && !(parent instanceof MPerspective)) {
+ parent.setToBeRendered(toBeRendered);
+ parent = parent.getParent();
+ }
+ element.setToBeRendered(toBeRendered);
+ }
}