Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16540/src/net/sourceforge/bprocessor/gui
Modified Files:
PopupMenu.java
Log Message:
When makepopupfromselection is called the list is packed into a new collection structure to be able to empty the selction and then alter the objects
Index: PopupMenu.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** PopupMenu.java 12 Oct 2007 10:19:15 -0000 1.43
--- PopupMenu.java 15 Oct 2007 12:43:56 -0000 1.44
***************
*** 399,403 ****
Selection.primary().clear();
for (Entity current : entities) {
! ((Geometric) current).erase();
Project.getInstance().changed(current);
}
--- 399,407 ----
Selection.primary().clear();
for (Entity current : entities) {
! if (current instanceof Geometric) {
! ((Geometric)current).erase();
! } else {
! current.delete();
! }
Project.getInstance().changed(current);
}
***************
*** 570,582 ****
type = next;
} else if (!next.getClass().isInstance(type)) {
! return PopupMenu.getEntiesMenu(new LinkedList(Selection.primary()));
}
}
if (type instanceof Space) {
! return PopupMenu.getSpaceMenu(Selection.primary());
} else if (type instanceof Surface) {
! return PopupMenu.getSurfaceMenu(Selection.primary());
} else {
! return PopupMenu.getEntiesMenu(new LinkedList(Selection.primary()));
}
}
--- 574,586 ----
type = next;
} else if (!next.getClass().isInstance(type)) {
! return PopupMenu.getEntiesMenu(new LinkedList<Geometric>(Selection.primary()));
}
}
if (type instanceof Space) {
! return PopupMenu.getSpaceMenu(new LinkedList<Geometric>(Selection.primary()));
} else if (type instanceof Surface) {
! return PopupMenu.getSurfaceMenu(new LinkedList<Geometric>(Selection.primary()));
} else {
! return PopupMenu.getEntiesMenu(new LinkedList<Geometric>(Selection.primary()));
}
}
|