diff options
author | Paul Webster | 2014-10-22 16:39:11 +0000 |
---|---|---|
committer | Paul Webster | 2014-10-22 16:39:11 +0000 |
commit | 4a2494379c2aa90d55b166c76f13d14f1bea11cb (patch) | |
tree | f69632e0ce8b70cab3471cb2269c824b02f7f20a | |
parent | 3d5377790b611a321b0b757bae1119d032fb99fe (diff) | |
download | eclipse.platform.ui-4a2494379c2aa90d55b166c76f13d14f1bea11cb.tar.gz eclipse.platform.ui-4a2494379c2aa90d55b166c76f13d14f1bea11cb.tar.xz eclipse.platform.ui-4a2494379c2aa90d55b166c76f13d14f1bea11cb.zip |
Bug 396853 - [ViewMgmt] No longer possible to make a part visible
without activating/forcing focus on it
If we're making a part visible and it's in the same stack as the active
part, we make the part the active part (Eclipse4 behaviour). This makes
sure we don't re-activate the already active part (causing a spurious
setFocus call).
Change-Id: I4099ff3c30664a5b5ef3fdaec939f500a7fe4bbd
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java index 390e1b2e6a1..a58f4709c33 100644 --- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java +++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java @@ -1108,7 +1108,8 @@ public class PartServiceImpl implements EPartService { return addedPart; case VISIBLE: MPart activePart = getActivePart(); - if (activePart == null || getParent(activePart) == getParent(addedPart)) { + if (activePart == null + || (activePart != addedPart && getParent(activePart) == getParent(addedPart))) { delegateBringToTop(addedPart); activate(addedPart); } else { |