Commit 2f19214
committed
Ensure active part receives focus on perspective switch
When switching a perspective, if a view exists in both the old and the
new perspective, it doesn't gain focus after the perspective switch.
This is contrary to the case in which a view is open only in the new
perspective. Since editors are shared between perspectives, the same bug
always occurs for editors - the editor will lose focus on a perspective
switch.
This change adds part focusing code on the code branch, on which the
active part already exists in the new perspective. This ensures the
active part gains focus.
Note that this change doesn't preserve focus of the active part in each
perspective. I.e. if View A is active in perspective X and View B was
active in perspective Y, upon switching to perspective Y, View A will
become active if it exists. The change only ensures that focus is not
lost altogether.
Fixes: #2839
Signed-off-by: Simeon Andreev <[email protected]>1 parent edbc549 commit 2f19214
File tree
1 file changed
+3
-0
lines changed- bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
733 | 736 | | |
734 | 737 | | |
735 | 738 | | |
| |||
0 commit comments