Issue #1541 Fixed tool activation so always happens in part activated/deactivated listener.
Change-Id: I515bfe867c4ad9c74280173badae408d0ee5dab9 Former-commit-id:1255469084
[formerlyeaae098e29
] [formerly4fae854006
] [formerlyad37f68537
[formerly4fae854006
[formerly c0f98136403a05755d1c7c640f264f1bafe64a4f]]] Former-commit-id:ad37f68537
Former-commit-id: 44472abf492b5c54704e9e81afafe3a668b3bfa3 [formerly9d2a960cb4
] Former-commit-id:88d5c2f793
This commit is contained in:
parent
d25d858a66
commit
5d59242f46
2 changed files with 15 additions and 6 deletions
|
@ -136,6 +136,20 @@ public abstract class AbstractVizPerspectiveManager implements
|
|||
|
||||
@Override
|
||||
public void partDeactivated(IWorkbenchPart part) {
|
||||
// update editor on last selected modal tool
|
||||
if (part instanceof IEditorPart
|
||||
&& part instanceof IDisplayPaneContainer) {
|
||||
AbstractVizPerspectiveManager mgr = VizPerspectiveListener
|
||||
.getCurrentPerspectiveManager();
|
||||
if (mgr != null) {
|
||||
for (AbstractModalTool tool : mgr.getToolManager()
|
||||
.getSelectedModalTools()) {
|
||||
if (tool.getCurrentEditor() == part) {
|
||||
tool.deactivate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -362,12 +376,6 @@ public abstract class AbstractVizPerspectiveManager implements
|
|||
page.hideEditor(ref);
|
||||
}
|
||||
|
||||
for (AbstractModalTool tool : toolManager.getSelectedModalTools()) {
|
||||
if (tool != null) {
|
||||
tool.deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
deactivateDialogs();
|
||||
deactivateContexts();
|
||||
removeFromStatusLine();
|
||||
|
|
|
@ -156,6 +156,7 @@ public abstract class AbstractModalTool extends AbstractTool {
|
|||
this.setEnabled(false);
|
||||
if (editor != null) {
|
||||
deactivateTool();
|
||||
editor = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue