Issue #1242 Fix wierd GFE behavior when Grid Manager is maximized.
Change-Id: I2e6d6929a8a8af8dab3320bdf8cda3466fe05fa8 Former-commit-id: 4fb21077aba1dd9cfafc7f046b02f24f750c6384
This commit is contained in:
parent
bcd6709455
commit
8e8c713884
3 changed files with 18 additions and 21 deletions
|
@ -34,9 +34,14 @@
|
|||
</equals>
|
||||
</iterate>
|
||||
</with>
|
||||
<or>
|
||||
<with variable="activePart">
|
||||
<instanceof value="com.raytheon.viz.gfe.GridManagerView"/>
|
||||
</with>
|
||||
<with variable="activeEditor">
|
||||
<instanceof value="com.raytheon.uf.viz.core.IDisplayPaneContainer"/>
|
||||
</with>
|
||||
</or>
|
||||
</and>
|
||||
</definition>
|
||||
</extension>
|
||||
|
|
|
@ -22,9 +22,9 @@ package com.raytheon.viz.gfe.gridmanager.action;
|
|||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
|
||||
import com.raytheon.uf.viz.core.drawables.IDescriptor.FrameChangeOperation;
|
||||
import com.raytheon.uf.viz.core.drawables.IFrameCoordinator.FrameChangeOperation;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.gfe.gridmanager.IGridManager;
|
||||
import com.raytheon.viz.ui.tools.AbstractTool;
|
||||
|
||||
/**
|
||||
|
@ -56,36 +56,28 @@ public class GFEFrameTool extends AbstractTool {
|
|||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
|
||||
this.editor = EditorUtil.getActiveVizContainer();
|
||||
if (this.editor == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
this.editor.getLoopProperties().setLooping(false);
|
||||
|
||||
String operationStr = arg0.getParameter("operation");
|
||||
FrameChangeOperation operation = FrameChangeOperation
|
||||
.valueOf(operationStr);
|
||||
|
||||
DataManager dm = DataManager.getCurrentInstance();
|
||||
IGridManager gm = DataManager.getCurrentInstance().getGridManager();
|
||||
|
||||
switch (operation) {
|
||||
case PREVIOUS:
|
||||
dm.getGridManager().previousSelectedGrid();
|
||||
gm.previousSelectedGrid();
|
||||
break;
|
||||
case NEXT:
|
||||
dm.getGridManager().nextSelectedGrid();
|
||||
gm.nextSelectedGrid();
|
||||
break;
|
||||
case FIRST:
|
||||
dm.getGridManager().firstSelectedGrid();
|
||||
gm.firstSelectedGrid();
|
||||
break;
|
||||
case LAST:
|
||||
dm.getGridManager().lastSelectedGrid();
|
||||
gm.lastSelectedGrid();
|
||||
break;
|
||||
}
|
||||
|
||||
editor.refresh();
|
||||
dm.getGridManager().redraw();
|
||||
gm.redraw();
|
||||
|
||||
return null;
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ public abstract class AbstractWorkbenchPartContextActivator implements
|
|||
protected abstract boolean isPerspectivePart(IWorkbenchPartReference partRef);
|
||||
|
||||
private void deactivate(IWorkbenchPartReference partRef) {
|
||||
if (isPerspectivePart(partRef)) {
|
||||
if ((partRef != null) && isPerspectivePart(partRef)) {
|
||||
contextManager.deactivateContexts(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void activate(IWorkbenchPartReference partRef) {
|
||||
if (isPerspectivePart(partRef)) {
|
||||
if ((partRef != null) && isPerspectivePart(partRef)) {
|
||||
contextManager.activateContexts(this);
|
||||
} else {
|
||||
contextManager.deactivateContexts(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue