svn commit: r18688 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2010-08-26 10:59:42-0700
New Revision: 18688

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java

Log:
Don't lose selected value of namespace when dropdown is pressed on combo

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java?view=diff&pathrev=18688&r1=18687&r2=18688
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLModelElementNamespaceComboBoxModel.java	2010-08-26 10:59:42-0700
@@ -113,6 +113,8 @@
      */
     protected void buildModelList() {
         Set<Object> elements = new TreeSet<Object>(new PathComparator());
+
+        Object selectedElement = getSelectedModelElement();
         
         Object model =
             ProjectManager.getManager().getCurrentProject().getRoot();
@@ -140,6 +142,10 @@
         // so remove all the old contents first
         removeAllElements();
         addAll(elements);
+
+        if (selectedElement != null) {
+            setSelectedItem(selectedElement);
+        }
     }
 
     /*

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2651786

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.