Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17766/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
PencilTool.java
Log Message:
Fixed bug in snap in PencilTool
Index: PencilTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** PencilTool.java 5 Sep 2005 14:42:05 -0000 1.14
--- PencilTool.java 6 Sep 2005 07:39:24 -0000 1.15
***************
*** 171,176 ****
*/
protected double round(double value) {
! int i = (int) value;
! if (Math.abs(i - value) < 0.3) {
return Math.round(value);
} else {
--- 171,175 ----
*/
protected double round(double value) {
! if (Math.abs(value - Math.round(value)) < 0.3) {
return Math.round(value);
} else {
***************
*** 257,261 ****
if (current.getId() == null) {
snap(current);
!
}
return legal;
--- 256,264 ----
if (current.getId() == null) {
snap(current);
! Set vertices = VertexFacade.getInstance().findByLocation
! (current.getX(), current.getY(), current.getZ(), 0.0);
! if (!vertices.isEmpty()) {
! current = (Vertex) vertices.iterator().next();
! }
}
return legal;
|