Update of /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26112/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
OffsetTool.java AbstractPencil.java
Log Message:
Fixed offsettool, could not offset after pressing esc. we have to remember to call super when overriting methods always...
Index: OffsetTool.java
===================================================================
RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** OffsetTool.java 15 Nov 2006 09:53:17 -0000 1.13
--- OffsetTool.java 18 May 2007 09:13:17 -0000 1.14
***************
*** 156,159 ****
--- 156,160 ----
* @param e The MouseEvent object
*/
+ @Override
protected void moved(MouseEvent e) {
current = findIntersection(e);
***************
*** 207,213 ****
private void endOffset() {
Geometry.insertEdges(contour);
directionMap = new HashMap();
! contour = new LinkedList();
! start = null;
lastOffsetPoint = null;
surfaceFound = false;
--- 208,221 ----
private void endOffset() {
Geometry.insertEdges(contour);
+ cleanUp();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void cleanUp() {
directionMap = new HashMap();
! contour.clear();
lastOffsetPoint = null;
surfaceFound = false;
***************
*** 216,219 ****
--- 224,228 ----
edge = null;
feedback(contour);
+ super.cleanUp();
}
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -d -r1.79 -r1.80
*** AbstractPencil.java 16 May 2007 07:45:17 -0000 1.79
--- AbstractPencil.java 18 May 2007 09:13:17 -0000 1.80
***************
*** 733,736 ****
--- 733,737 ----
/**
* Clean up
+ * REMEMBER TO CALL super.cleanUp() WHEN OVERWRITEING
*/
public void cleanUp() {
|