From bace3ea5fea11e18c5ce6a057bdc7e3ca2055704 Mon Sep 17 00:00:00 2001 From: bobbylight Date: Sun, 28 Jul 2024 10:37:19 -0400 Subject: [PATCH] Fix #91: Hint popups not dismissed on hierarchy change --- .../src/main/java/org/fife/ui/autocomplete/AutoCompletion.java | 1 + .../java/org/fife/ui/autocomplete/demo/AutoCompleteDemoApp.java | 2 +- .../main/java/org/fife/ui/autocomplete/demo/DemoRootPane.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java index ae512c6..ef89a60 100644 --- a/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java +++ b/AutoComplete/src/main/java/org/fife/ui/autocomplete/AutoCompletion.java @@ -1509,6 +1509,7 @@ public void componentResized(ComponentEvent e) { } public void removeFrom(Window w) { + hideChildWindows(); w.removeComponentListener(this); w.removeWindowFocusListener(this); } diff --git a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/AutoCompleteDemoApp.java b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/AutoCompleteDemoApp.java index 7b2351c..3412e60 100644 --- a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/AutoCompleteDemoApp.java +++ b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/AutoCompleteDemoApp.java @@ -27,7 +27,7 @@ public class AutoCompleteDemoApp extends JFrame { /** * Constructor. */ - public AutoCompleteDemoApp() { + AutoCompleteDemoApp() { this(null); } diff --git a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/DemoRootPane.java b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/DemoRootPane.java index a34bbf1..81241b3 100644 --- a/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/DemoRootPane.java +++ b/AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo/DemoRootPane.java @@ -340,7 +340,7 @@ private void updateEditorPane() { Font f = UIManager.getFont("Label.font"); String fontTag = ""; - String text = "" + fontTag + "" + + String text = "" + fontTag + "The text area below provides simple code completion for the C " + "programming language as you type. Simply type Ctrl+Space " + "at any time to see a list of completion choices (function names, "+