Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11580
Modified Files:
PencilTool.java
Log Message:
disabled snapping when not drawing in the XY-plane
Index: PencilTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** PencilTool.java 20 Sep 2005 17:27:47 -0000 1.21
--- PencilTool.java 23 Sep 2005 10:47:13 -0000 1.22
***************
*** 242,245 ****
--- 242,246 ----
}
}
+
/**
* Set current vertex to an appropriate vertex
***************
*** 249,252 ****
--- 250,254 ----
protected boolean findVertex(MouseEvent event) {
boolean legal = true;
+ boolean snap = false;
double x = event.getX();
double y = AbstractView.getHeight() - event.getY();
***************
*** 287,290 ****
--- 289,293 ----
Plane xy = new Plane(0, 0, 1, 0);
Vertex vertex = xy.intersection(ray);
+ snap = true;
if (vertex != null) {
vertex.setName("V" + vertexNum++);
***************
*** 293,297 ****
}
if (current.getId() == null) {
! snap(current);
Set vertices = VertexFacade.getInstance().findByLocation
(current.getX(), current.getY(), current.getZ(), 0.0);
--- 296,302 ----
}
if (current.getId() == null) {
! if (snap) {
! snap(current);
! }
Set vertices = VertexFacade.getInstance().findByLocation
(current.getX(), current.getY(), current.getZ(), 0.0);
|