[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui PopupMenu.java, 1.86, 1.87 GUI.java, 1.8
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-12-12 10:48:22
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1801/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java GUI.java Log Message: Removed a lot of copying code Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** PopupMenu.java 11 Dec 2007 15:14:19 -0000 1.86 --- PopupMenu.java 12 Dec 2007 10:48:19 -0000 1.87 *************** *** 246,264 **** menu.add(action); } - AbstractAction copy = new CollectionMenuAction(s, "Duplicate") { - public void actionPerformed(ActionEvent arg0) { - if (col != null) { - Iterator iter = col.iterator(); - while (iter.hasNext()) { - Space space = (Space)iter.next(); - Space spaceCopy = space.copy(); - space.getOwner().add(spaceCopy); - Selection.primary().set(spaceCopy); - Project.getInstance().checkpoint(); - } - } - } - }; - menu.add(copy); AbstractAction instantiate = new CollectionMenuAction(s, "Instantiate") { public void actionPerformed(ActionEvent arg0) { --- 246,249 ---- Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** GUI.java 12 Dec 2007 10:41:11 -0000 1.86 --- GUI.java 12 Dec 2007 10:48:19 -0000 1.87 *************** *** 405,411 **** Geometric g = iter.next(); if (g instanceof Space) { ! Space copy = ((Space)g).copy(); ! g.getOwner().add(copy); ! copied.add(copy); } else if (g instanceof Edge) { Edge copy = ((Edge)g).copy(); --- 405,409 ---- Geometric g = iter.next(); if (g instanceof Space) { ! // nothing } else if (g instanceof Edge) { Edge copy = ((Edge)g).copy(); |