aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moffatt2013-05-07 12:38:41 (EDT)
committerGerrit Code Review @ Eclipse.org2013-05-10 07:33:28 (EDT)
commitad41c3ee35d4a4f9292a1246b61c58e1b9e0c383 (patch)
treeb60245597e59bc888b5a3c416a40cdf394c56a88
parent5586b4276a8bad64ed208b81521e93368db16cf9 (diff)
downloadeclipse.platform.ui-ad41c3ee35d4a4f9292a1246b61c58e1b9e0c383.zip
eclipse.platform.ui-ad41c3ee35d4a4f9292a1246b61c58e1b9e0c383.tar.gz
eclipse.platform.ui-ad41c3ee35d4a4f9292a1246b61c58e1b9e0c383.tar.bz2
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
index 8a595c8..809a895 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
@@ -118,14 +118,16 @@ public class PartRenderingEngine implements IPresentationEngine {
.eContainer();
}
- boolean menuChild = parent instanceof MMenu;
-
- // If the parent isn't displayed who cares?
- if (!(parent instanceof MApplication)
- && (parent == null || parent.getWidget() == null || menuChild))
+ // menus are not handled here... ??
+ if (parent instanceof MMenu)
return;
- if (changedElement.isToBeRendered()) {
+ // If the parent isn't visible we don't care (The application is
+ // never rendered)
+ boolean okToRender = parent instanceof MApplication
+ || parent.getWidget() != null;
+
+ if (changedElement.isToBeRendered() && okToRender) {
Activator.trace(Policy.DEBUG_RENDERER, "visible -> true", null); //$NON-NLS-1$
// Note that the 'createGui' protocol calls 'childAdded'
@@ -142,12 +144,14 @@ public class PartRenderingEngine implements IPresentationEngine {
if (parent.getSelectedElement() == changedElement)
parent.setSelectedElement(null);
- // Un-maximize the element before tearing it down
- if (changedElement.getTags().contains(MAXIMIZED))
- changedElement.getTags().remove(MAXIMIZED);
+ if (okToRender) {
+ // Un-maximize the element before tearing it down
+ if (changedElement.getTags().contains(MAXIMIZED))
+ changedElement.getTags().remove(MAXIMIZED);
- // Note that the 'removeGui' protocol calls 'childRemoved'
- removeGui(changedElement);
+ // Note that the 'removeGui' protocol calls 'childRemoved'
+ removeGui(changedElement);
+ }
}
}