From eaf47ca3571bdba959aa60201c55ff0fa993e67c Mon Sep 17 00:00:00 2001 From: Dmitry Drobotov Date: Thu, 19 Dec 2024 18:50:05 +0100 Subject: [PATCH] IJPL-172840 Extend suspension of Usages tree accessibility announcements UsageState.restore also expands a tree node, and because it's called for every node, it shouldn't generate tree expanded events. (cherry picked from commit 3c3d581e94bab9fe08ff655ac5c656aa21617a2e) IJ-CR-151182 GitOrigin-RevId: cde9f512f810a3e4bb5a470bd7bef3b36540e686 --- .../src/com/intellij/usages/impl/UsageViewImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/usageView-impl/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView-impl/src/com/intellij/usages/impl/UsageViewImpl.java index 73c77a090248..34fd0038b4af 100644 --- a/platform/usageView-impl/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView-impl/src/com/intellij/usages/impl/UsageViewImpl.java @@ -1149,16 +1149,16 @@ public class UsageViewImpl implements UsageViewEx { myTree.expandPath(treePath); } } + myTree.getSelectionModel().clearSelection(); + for (UsageState usageState : states) { + usageState.restore(); + } } finally { if (myTree instanceof Tree jbTree) { jbTree.resumeExpandCollapseAccessibilityAnnouncements(); } } - myTree.getSelectionModel().clearSelection(); - for (UsageState usageState : states) { - usageState.restore(); - } } public void expandAll() {