Merge "Issue #1799 Fix pan/zoom when in views." into omaha_13.3.1

Former-commit-id: 1a59204892 [formerly 1a59204892 [formerly 69ec257d3a90ffcaa81d92f34ff545d4c49bb1d3]]
Former-commit-id: 049e955db9
Former-commit-id: f8d2fdacea
This commit is contained in:
Lee Venable 2013-03-26 15:01:51 -05:00 committed by Gerrit Code Review
commit f0ed70f9fb

View file

@ -72,6 +72,7 @@ import com.raytheon.viz.ui.tools.ModalToolManager;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 22, 2008 randerso Initial creation
* Mar 26, 2013 1799 bsteffen Fix pan/zoom when in views.
*
* </pre>
*
@ -141,11 +142,15 @@ public abstract class AbstractVizPerspectiveManager implements
&& part instanceof IDisplayPaneContainer) {
AbstractVizPerspectiveManager mgr = VizPerspectiveListener
.getCurrentPerspectiveManager();
if (mgr != null) {
for (AbstractModalTool tool : mgr.getToolManager()
.getSelectedModalTools()) {
if (tool.getCurrentEditor() == part) {
tool.deactivate();
IWorkbenchPart newPart = part.getSite().getPage()
.getActivePart();
if (newPart instanceof IEditorPart) {
if (mgr != null) {
for (AbstractModalTool tool : mgr.getToolManager()
.getSelectedModalTools()) {
if (tool.getCurrentEditor() == part) {
tool.deactivate();
}
}
}
}