directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r829747 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java
Date Mon, 26 Oct 2009 10:36:18 GMT
Author: seelmann
Date: Mon Oct 26 10:36:18 2009
New Revision: 829747

URL: http://svn.apache.org/viewvc?rev=829747&view=rev
Log:
Deselect any selected attributes and values when setting a new input.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java?rev=829747&r1=829746&r2=829747&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditor.java
Mon Oct 26 10:36:18 2009
@@ -35,6 +35,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -412,6 +413,15 @@
         if ( mainWidget != null )
         {
             universalListener.setInput( eei.getSharedWorkingCopy( this ) );
+
+            /*
+             * Explicitly deselect previously selected attributes and values.
+             * This avoids disabled actions if the new input is equal but not
+             * identical to the previous input. This happens for example if
+             * an ISearchResult or IBookmark object is open and afterwards 
+             * the IEntry object is opened.
+             */
+            mainWidget.getViewer().setSelection( StructuredSelection.EMPTY );
         }
     }
 



Mime
View raw message