directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r691807 - /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java
Date Wed, 03 Sep 2008 22:25:17 GMT
Author: seelmann
Date: Wed Sep  3 15:25:17 2008
New Revision: 691807

URL: http://svn.apache.org/viewvc?rev=691807&view=rev
Log:
Fix for DIRSTUDIO-292: Use selected entry as parent

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java?rev=691807&r1=691806&r2=691807&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java
Wed Sep  3 15:25:17 2008
@@ -176,16 +176,15 @@
                     contextEntryDnCombo.setText( newEntry.getDn().getUpName() );
                 }
             }
-
         }
         else
         {
-
             Subschema subschema = newEntry.getSubschema();
             String[] attributeNames = subschema.getAllAttributeNames();
 
             LdapDN parentDn = null;
-            if ( DnUtils.getParent( newEntry.getDn() ) != null )
+            if ( newEntry.getDn().equals( wizard.getSelectedEntry().getDn() )
+                && DnUtils.getParent( newEntry.getDn() ) != null )
             {
                 parentDn = DnUtils.getParent( newEntry.getDn() );
             }
@@ -193,6 +192,10 @@
             {
                 parentDn = wizard.getSelectedEntry().getDn();
             }
+            else if ( DnUtils.getParent( newEntry.getDn() ) != null )
+            {
+                parentDn = DnUtils.getParent( newEntry.getDn() );
+            }
 
             Rdn rdn = newEntry.getRdn();
 



Mime
View raw message