[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui PopupMenu.java, 1.40, 1.41
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-08-31 09:45:24
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14230/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: Made D-view selection work more intuitive (tried to copy eclipse way) Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** PopupMenu.java 28 Aug 2007 07:00:52 -0000 1.40 --- PopupMenu.java 31 Aug 2007 09:45:23 -0000 1.41 *************** *** 433,436 **** --- 433,438 ---- for (Space space : interior) { surfaces.addAll(space.getEnvelope()); + spaces.add(space); + owner = space.getOwner(); } *************** *** 555,573 **** } else { Iterator sel = Selection.primary().iterator(); ! Class<? extends Object> type = null; while (sel.hasNext()) { Object next = sel.next(); if (type == null) { ! type = next.getClass(); ! } else if (type == next.getClass()) { ! // do nothing just continue; ! continue; ! } else { return PopupMenu.getEntiesMenu(new LinkedList(Selection.primary())); ! } } ! if (type == Space.class) { return PopupMenu.getSpaceMenu(Selection.primary()); ! } else if (type == Surface.class) { return PopupMenu.getSurfaceMenu(Selection.primary()); } else { --- 557,572 ---- } else { Iterator sel = Selection.primary().iterator(); ! Object type = null; while (sel.hasNext()) { Object next = sel.next(); if (type == null) { ! 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 { |