Omaha #3430 Remove errors returned when MB3 clicking off the map with snapping tool in editable mode
Change-Id: Id4fbe8480e1d796eed448a791982570bb85f657c Former-commit-id:23538197f6
[formerly33e311c361
] [formerlycc690ec2c3
[formerly b27dc2ad7076e73461d880e4daa987f49496f30d]] Former-commit-id:cc690ec2c3
Former-commit-id:c4eb912c7d
This commit is contained in:
parent
f4555772f1
commit
0356569e9f
4 changed files with 26 additions and 7 deletions
|
@ -84,6 +84,9 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
|||
* 02-08-11 #8214 bkowal Points now have the Magnification
|
||||
* capability.
|
||||
* 07-31-2012 #875 rferrel Converted to use points.
|
||||
* 07-28-2014 #3430 mapeters Updated move function to prevent errors
|
||||
* when MB3 clicking off the map with
|
||||
* tool in editable mode.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -358,10 +361,8 @@ public class PointsToolLayer extends AbstractMovableToolLayer<Point> implements
|
|||
Point point) {
|
||||
if (point.getMovable() == PointFieldState.TRUE) {
|
||||
if (clickLoc == null) {
|
||||
clickLoc = lastClickedCoordinate;
|
||||
// Get The Current Coordinates Of The "Point".
|
||||
lastClickedCoordinate = this.dataManager.getCoordinate(point
|
||||
.getName());
|
||||
clickLoc = (lastClickedCoordinate == null) ? this.dataManager
|
||||
.getCoordinate(point.getName()) : lastClickedCoordinate;
|
||||
}
|
||||
|
||||
Point newPoint = new Point(point);
|
||||
|
|
|
@ -87,6 +87,9 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* 06-14-10 #6360 bkowal Ensured that the position of the tool would not
|
||||
* be changed twice when the user pressed [1] and
|
||||
* released [2] the right-mouse button.
|
||||
* 07-28-14 #3430 mapeters Updated the 'handleMouseUp' function to prevent
|
||||
* errors created when MB3 clicking off the map
|
||||
* in editable mode.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -132,6 +135,11 @@ public class AzimuthToolLayer extends
|
|||
public boolean handleMouseUp(int x, int y, int mouseButton) {
|
||||
if (nextCoordinate != null || (mouseButton == 3 && isEditable())) {
|
||||
currCoordinate = getResourceContainer().translateClick(x, y);
|
||||
|
||||
if (currCoordinate == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
centerPixel = descriptor.worldToPixel(new double[] {
|
||||
currCoordinate.x, currCoordinate.y });
|
||||
nextCoordinate = null;
|
||||
|
|
|
@ -40,8 +40,8 @@ import com.raytheon.uf.viz.core.IGraphicsTarget;
|
|||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont.Style;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
|
@ -70,6 +70,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* 15Jan2007 ebabin Update for lat/lon put home cursor bug.
|
||||
* 10-21-09 #1049 bsteffen Refactor to common MovableTool model
|
||||
* 15Mar2013 15693 mgamazaychikov Added magnification capability.
|
||||
* 28Jul2014 3430 mapeters Updated move function to prevent errors when
|
||||
* MB3 clicking off the map in editable mode.
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -263,8 +265,9 @@ public class HomeToolLayer extends AbstractMovableToolLayer<Coordinate>
|
|||
|
||||
@Override
|
||||
protected Coordinate move(Coordinate lastMouseLoc, Coordinate mouseLoc,
|
||||
Coordinate object) {
|
||||
return new Coordinate(mouseLoc != null ? mouseLoc : lastMouseLoc);
|
||||
Coordinate lastHomeLoc) {
|
||||
return (lastMouseLoc == null) ? lastHomeLoc : new Coordinate(
|
||||
mouseLoc != null ? mouseLoc : lastMouseLoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -73,6 +73,9 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* Sep 03, 2013 2310 bsteffen Move MouseHandler from ShearAction to
|
||||
* ShearLayer.
|
||||
* Mar 3, 2014 2804 mschenke Set back up clipping pane
|
||||
* Jul 28, 2014 3430 mapeters Updated the 'handleMouseUp' function
|
||||
* to prevent errors when MB3 clicking off
|
||||
* the map with tool in editable mode.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -642,6 +645,10 @@ public class ShearLayer extends
|
|||
}
|
||||
Coordinate c = container.translateClick(x, y);
|
||||
|
||||
if (c == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// move prior unmoved end point
|
||||
Coordinate[] coords = shearLayer.getBaseline()
|
||||
.getCoordinates();
|
||||
|
|
Loading…
Add table
Reference in a new issue