Author: kmorin Date: 2013-03-14 10:57:51 +0100 (Thu, 14 Mar 2013) New Revision: 2621 Url: http://nuiton.org/projects/jaxx/repository/revisions/2621 Log: fixes #2591 BeanFilterableComboBox - Bug when removing an item, the UI freezes Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanFilterableComboBoxHandler.java Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanFilterableComboBoxHandler.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanFilterableComboBoxHandler.java 2013-03-12 18:23:22 UTC (rev 2620) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanFilterableComboBoxHandler.java 2013-03-14 09:57:51 UTC (rev 2621) @@ -122,7 +122,8 @@ JaxxFilterableComboBoxModel model = (JaxxFilterableComboBoxModel) comboBox.getModel(); JTextComponent editorComponent = (JTextComponent) comboBox.getEditor().getEditorComponent(); // hide the popup before setting the filter, otherwise the popup height does not fit - if (comboBox.isShowing()) { + boolean wasPopupVisible = comboBox.isShowing() && comboBox.isPopupVisible(); + if (wasPopupVisible) { comboBox.hidePopup(); } String text = editorComponent.getText(); @@ -130,7 +131,7 @@ log.debug("updateFilter " + text); } model.setFilterText(text); - if (comboBox.isShowing()) { + if (wasPopupVisible) { comboBox.showPopup(); } }
participants (1)
-
kmorin@users.nuiton.org