[hg] main-silver: #235920: combo is allowed to close first on de...

  • From: Svata Dedic < >
  • To:
  • Subject: [hg] main-silver: #235920: combo is allowed to close first on de...
  • Date: Thu, 07 Nov 2013 21:53:53 +0000

changeset b14faa833f5a in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/b14faa833f5a
description:
        #235920: combo is allowed to close first on delete confirmation

diffstat:

 
code.analysis/src/org/netbeans/modules/analysis/ui/ConfigurationsComboModel.java
 |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (33 lines):

diff --git 
a/code.analysis/src/org/netbeans/modules/analysis/ui/ConfigurationsComboModel.java
 
b/code.analysis/src/org/netbeans/modules/analysis/ui/ConfigurationsComboModel.java
--- 
a/code.analysis/src/org/netbeans/modules/analysis/ui/ConfigurationsComboModel.java
+++ 
b/code.analysis/src/org/netbeans/modules/analysis/ui/ConfigurationsComboModel.java
@@ -53,6 +53,7 @@
 import javax.swing.JComboBox;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
+import javax.swing.SwingUtilities;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.event.PopupMenuEvent;
@@ -312,8 +313,11 @@
                 setSelectedItem(getElementAt(0));
                 return;
             }
-            JComboBox combo = (JComboBox) ae.getSource();
+            final JComboBox combo = (JComboBox) ae.getSource();
             combo.setSelectedItem(lastSelected);
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
             if (JOptionPane.showConfirmDialog(combo, 
             Bundle.MSG_ReallyDeleteConfig(lastSelected),
             Bundle.DeleteConfigTitle(),
@@ -322,6 +326,8 @@
                 setSelectedItem(getElementAt(0));
             }
         }
+            });
+        }
 
         @Override
         public String toString() {

[hg] main-silver: #235920: combo is allowed to close first on de...

Svata Dedic 11/07/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 148 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close