Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24550/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
ConstructorTool.java AbstractPencil.java
Log Message:
Fixed alignment issues in ConstructorTool
Index: ConstructorTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ConstructorTool.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ConstructorTool.java 19 Jul 2006 09:00:19 -0000 1.4
--- ConstructorTool.java 19 Jul 2006 11:25:28 -0000 1.5
***************
*** 84,88 ****
* Update Constructors
*/
! protected void updateConstructors() {
List constructors = new LinkedList();
List points = new LinkedList();
--- 84,88 ----
* Update Constructors
*/
! protected void updateFeedback() {
List constructors = new LinkedList();
List points = new LinkedList();
***************
*** 104,109 ****
excluded.addAll(constructors);
points(points);
! constructors(constructors);
! excluded(excluded);
}
--- 104,110 ----
excluded.addAll(constructors);
points(points);
! feedback(constructors);
! makeTarget(current);
! updateConstructors();
}
***************
*** 114,123 ****
current = findIntersection(e);
if (current != null) {
! makeTarget(current);
! updateConstructors();
}
}
/**
* @param e MouseEvent
*/
--- 115,132 ----
current = findIntersection(e);
if (current != null) {
! updateFeedback();
}
}
/**
+ *
+ */
+ public void cleanUp() {
+ super.cleanUp();
+ p1 = null;
+ p2 = null;
+ }
+
+ /**
* @param e MouseEvent
*/
***************
*** 125,133 ****
if (p1 == null) {
p1 = current;
} else {
if (p1.vertex().equalEps(current.vertex())) {
insertPoint(current.vertex());
! p1 = null;
! p2 = null;
} else if (p2 == null) {
p2 = current;
--- 134,143 ----
if (p1 == null) {
p1 = current;
+ start = p1;
} else {
if (p1.vertex().equalEps(current.vertex())) {
insertPoint(current.vertex());
! cleanUp();
! return;
} else if (p2 == null) {
p2 = current;
***************
*** 135,148 ****
if (p2.vertex().equalEps(current.vertex())) {
insertLine(p1.vertex(), p2.vertex());
! p1 = null;
! p2 = null;
} else {
insertPlane(p1.vertex(), p2.vertex(), current.vertex());
! p1 = null;
! p2 = null;
}
}
}
! updateConstructors();
}
--- 145,158 ----
if (p2.vertex().equalEps(current.vertex())) {
insertLine(p1.vertex(), p2.vertex());
! cleanUp();
! return;
} else {
insertPlane(p1.vertex(), p2.vertex(), current.vertex());
! cleanUp();
! return;
}
}
}
! updateFeedback();
}
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** AbstractPencil.java 17 Jul 2006 09:08:42 -0000 1.38
--- AbstractPencil.java 19 Jul 2006 11:25:28 -0000 1.39
***************
*** 400,407 ****
}
/**
! * Update constructors based on start, current and incident.
*/
protected void updateConstructors() {
List constructors = new LinkedList();
if (start != null) {
--- 400,426 ----
}
+
/**
! * Update constructors
*/
protected void updateConstructors() {
+ List constructors = computeConstructors();
+ if (!showing) {
+ aligners(constructors);
+ constructors = new LinkedList();
+ if (current.object() instanceof Edge) {
+ constructors.add(current.object());
+ }
+ }
+ constructors(constructors);
+ number = "";
+ updateLength();
+ }
+
+ /**
+ * Update constructors based on start, current and incident.
+ * @return Constructors
+ */
+ protected List computeConstructors() {
List constructors = new LinkedList();
if (start != null) {
***************
*** 465,479 ****
}
}
!
! if (!showing) {
! aligners(constructors);
! constructors = new LinkedList();
! if (current.object() instanceof Edge) {
! constructors.add(current.object());
! }
! }
! constructors(constructors);
! number = "";
! updateLength();
}
--- 484,488 ----
}
}
! return constructors;
}
|