Fixed displaying hierarchy in tree view
This commit is contained in:
parent
84218c2ba2
commit
9a7e8e97fd
1 changed files with 2 additions and 0 deletions
|
@ -31,6 +31,8 @@ public class TreeView implements HttpHandler {
|
|||
// Wir suchen zuerst die erste Abweichung im Pfad
|
||||
// dabei wird das letzte Element (Blattknoten) in e übersprungen.
|
||||
int firstDeviation = -1;
|
||||
// Wenn der Stack tiefer ist als der aktuelle Pfad ist das ganz sicher mindestens eine Abweichung
|
||||
if ( stack.size() > e.length - 1 ) firstDeviation = e.length - 1;
|
||||
for ( int i = 0; i < Math.min(stack.size(), e.length - 1); i++ ) {
|
||||
if ( !e[i].equals(stack.get(i)) ) {
|
||||
firstDeviation = i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue