From 818c920ef4bbe3ce51c976fb40b31ec3619c8e5f Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Fri, 1 Nov 2024 19:39:51 +0100 Subject: [PATCH] FindReplaceOverlay: update position and size while not visible #2478 When changing position and/or size of the editor of a FindReplaceOverlay while it is hidden, e.g., because another editor in the same editor stack is active, the position and size of the overlay is not updated accordingly. Thus, when making the editor of that overlay active again, its position relative to the editor and size is still the same as before another editor was set active, i.e., it is usually wrong. With this change, the size and position of an overlay is always updated upon resize operations of the target editor, even if the editor is not visible. Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/2478 --- .../ui/internal/findandreplace/overlay/FindReplaceOverlay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java index 9b02ac7a3c6..9586c243543 100644 --- a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java +++ b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java @@ -204,7 +204,7 @@ private void performSelectAll() { .controlResizedAdapter(__ -> asyncExecIfOpen(FindReplaceOverlay.this::updatePlacementAndVisibility)); private void asyncExecIfOpen(Runnable operation) { - if (!containerControl.isDisposed() && containerControl.isVisible()) { + if (!containerControl.isDisposed()) { containerControl.getDisplay().asyncExec(() -> { if (containerControl != null || containerControl.isDisposed()) { operation.run();