From commits-return-19504-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Wed Sep 03 22:26:08 2008 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 43592 invoked from network); 3 Sep 2008 22:26:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Sep 2008 22:26:08 -0000 Received: (qmail 95563 invoked by uid 500); 3 Sep 2008 22:26:06 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 95507 invoked by uid 500); 3 Sep 2008 22:26:06 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 95496 invoked by uid 99); 3 Sep 2008 22:26:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 15:26:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 22:25:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6A6B9238899B; Wed, 3 Sep 2008 15:25:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: seelmann@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080903222517.6A6B9238899B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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();