[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool ToolFactory.java,1.23,1.24
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-01-19 10:58:23
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28207/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Prev tool works even if the same tool is selected multiple times Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ToolFactory.java 6 Jan 2006 15:36:14 -0000 1.23 --- ToolFactory.java 19 Jan 2006 10:58:12 -0000 1.24 *************** *** 161,196 **** */ public Tool get(int i) { ! previousTool = currentTool; if (i == Tool.SELECT_TOOL) { currentTool = select; - return select; } else if (i == Tool.MOVE_TOOL) { currentTool = move; - return move; } else if (i == Tool.EXTRUSION_TOOL) { currentTool = extrusion; - return extrusion; } else if (i == Tool.PENCIL_TOOL) { currentTool = pencil; - return pencil; } else if (i == Tool.CLIP_TOOL) { currentTool = clipplane; - return clipplane; } else if (i == Tool.ROTATION_TOOL) { currentTool = rotation; - return rotation; } else if (i == Tool.FLY_TOOL) { currentTool = fly; - return fly; } else if (i == Tool.WALK_TOOL) { currentTool = walk; - return walk; } else if (i == Tool.TAPE_MEASURE_TOOL) { currentTool = tapeMeasure; - return tapeMeasure; } else { log.error("[get] No such tool " + i); return null; } } --- 161,191 ---- */ public Tool get(int i) { ! Tool temp = currentTool; if (i == Tool.SELECT_TOOL) { currentTool = select; } else if (i == Tool.MOVE_TOOL) { currentTool = move; } else if (i == Tool.EXTRUSION_TOOL) { currentTool = extrusion; } else if (i == Tool.PENCIL_TOOL) { currentTool = pencil; } else if (i == Tool.CLIP_TOOL) { currentTool = clipplane; } else if (i == Tool.ROTATION_TOOL) { currentTool = rotation; } else if (i == Tool.FLY_TOOL) { currentTool = fly; } else if (i == Tool.WALK_TOOL) { currentTool = walk; } else if (i == Tool.TAPE_MEASURE_TOOL) { currentTool = tapeMeasure; } else { log.error("[get] No such tool " + i); return null; } + if (currentTool != temp) { + previousTool = temp; + } + return currentTool; } |