[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.102, 1.
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-08-31 09:45:31
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14230/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Made D-view selection work more intuitive (tried to copy eclipse way) Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** GenericTreeView.java 28 Aug 2007 07:00:52 -0000 1.102 --- GenericTreeView.java 31 Aug 2007 09:45:23 -0000 1.103 *************** *** 1361,1364 **** --- 1361,1377 ---- if (path != null) { if (e.isPopupTrigger()) { + if (getSelectionCount() < 2) { + setSelectionPath(path); + } else { + boolean wereFound = false; + for (TreePath treepath : getSelectionPaths()) { + if (treepath.equals(path)) { + wereFound = true; + } + } + if (!wereFound) { + setSelectionPath(path); + } + } Object object = path.getLastPathComponent(); if (object instanceof GenericNode) { |