Merged 1354 -7 and -8 into 1412

Former-commit-id: 082b54dc10676b7090f8a1c9a01929a6d7da2667
This commit is contained in:
Brian.Dyke 2014-04-09 11:39:07 -04:00
parent 6a28fcb156
commit 947194c998
4 changed files with 24 additions and 7 deletions

View file

@ -98,6 +98,7 @@ import com.vividsolutions.jts.geom.LineString;
* 15Mar2013 15693 mgamazaychikov Made sure that magnification capability works.
* 06-11-2013 DR 16234 D. Friedman Fix pivot index when frames count is reduced.
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
* 04-07-2014 DR 17232 D. Friedman Make sure pivot indexes are valid.
*
* </pre>
*
@ -210,9 +211,10 @@ public class StormTrackDisplay implements IRenderable {
}
if (currentFrame == currentState.displayedPivotIndex) {
if (currentState.displayedPivotIndex == currentState.pivotIndex) {
if (currentState.displayedPivotIndex == currentState.pivotIndex &&
currentState.otherPivotIndex >= 0) {
currentState.displayedPivotIndex = currentState.otherPivotIndex;
} else {
} else if (currentState.pivotIndex >= 0){
currentState.displayedPivotIndex = currentState.pivotIndex;
}
}
@ -234,9 +236,10 @@ public class StormTrackDisplay implements IRenderable {
currentState.displayedPivotIndex = currentState.pivotIndex;
currentState.nextPivotIndex = -1;
} else if (currentFrame == currentState.displayedPivotIndex) {
if (currentState.displayedPivotIndex == currentState.pivotIndex) {
if (currentState.displayedPivotIndex == currentState.pivotIndex &&
currentState.otherPivotIndex >= 0) {
currentState.displayedPivotIndex = currentState.otherPivotIndex;
} else {
} else if (currentState.pivotIndex >= 0){
currentState.displayedPivotIndex = currentState.pivotIndex;
}
} else if (currentFrame != currentState.displayedPivotIndex) {
@ -1401,4 +1404,5 @@ public class StormTrackDisplay implements IRenderable {
data.setMotionSpeed((int) mpsToKts.convert(state.speed));
dataManager.setStormTrackData(data);
}
}

View file

@ -63,6 +63,7 @@ import com.vividsolutions.jts.geom.Point;
* needs to update the track because
* the point has been moved.
* 08-12-2013 DR 16427 D. Friedman Prevent NPE.
* 04-07-2014 DR 17232 D. Friedman Set displayedPivotIndex when needed.
*
* </pre>
*
@ -270,6 +271,17 @@ public class StormTrackUIManager extends InputAdapter {
state.pointMoved = true;
FramesInfo info = controller.getDescriptor().getFramesInfo();
trackUtil.setPivotIndexes(info, state);
// This code is duplicated from StormTrackDisplay.paint().
if (state.displayedPivotIndex == trackUtil.getCurrentFrame(info)) {
if (state.displayedPivotIndex == state.pivotIndex &&
state.otherPivotIndex >= 0) {
state.displayedPivotIndex = state.otherPivotIndex;
} else if (state.pivotIndex >= 0) {
state.displayedPivotIndex = state.pivotIndex;
}
}
state.nextPivotIndex = trackUtil.getCurrentFrame(info);
controller.issueRefresh();
rval = true;

View file

@ -116,6 +116,7 @@ import com.raytheon.uf.common.time.TimeRange;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 11, 2011 dgilling Initial creation
* 04/08/2014 DR 17187 randerson (code checked in by zhao)
*
* </pre>
*
@ -451,7 +452,7 @@ public class WeatherInterp extends Interp {
// are already set to 0.
// get its value
key = keys1[index];
key = keys1[0xFF & index];
// find this key in the new list, and save the corresponding
// index
@ -466,7 +467,7 @@ public class WeatherInterp extends Interp {
// bytes
index = grid2.get(i, j);
// get its key
key = keys2[index];
key = keys2[0xFF & index];
// find this key in the new list, and save the corresponding
// index
for (int k = 0; k < _allKeys.size(); k++) {

View file

@ -26,7 +26,7 @@
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 03/20/14 #2933 randerso Changed PRDDIR and LOGDIR to use
Backup site's configuration
# Backup site's configuration
##############################################################################
import_file=${1}