directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r748922 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Date Sat, 28 Feb 2009 20:50:30 GMT
Author: seelmann
Date: Sat Feb 28 20:50:30 2009
New Revision: 748922

URL: http://svn.apache.org/viewvc?rev=748922&view=rev
Log:
Fixed issue with "Locate in DIT"

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java?rev=748922&r1=748921&r2=748922&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Sat Feb 28 20:50:30 2009
@@ -22,6 +22,7 @@
 
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserConfiguration;
@@ -220,17 +221,22 @@
             while ( tempEntry.getParententry() != null )
             {
                 IEntry parentEntry = tempEntry.getParententry();
-                entryList.add( 0, parentEntry );
+                entryList.add( 0, tempEntry );
                 tempEntry = parentEntry;
             }
 
-            for ( IEntry parentEntry : entryList )
+            for ( IEntry childEntry : entryList )
             {
+                IEntry parentEntry = childEntry.getParententry();
                 if ( !parentEntry.isChildrenInitialized() )
                 {
                     parentEntry.setChildrenInitialized( true );
                     parentEntry.setHasMoreChildren( true );
                 }
+                if ( !Arrays.asList( parentEntry.getChildren() ).contains( childEntry ) )
+                {
+                    parentEntry.addChild( childEntry );
+                }
 
                 // force refresh of each parent, beginning from the root
                 // if the entry to select was lazy initialized then the 



Mime
View raw message