mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ui: keep selection in Keymap settings on clearing of Shortcut filter
TreeExpansionMonitor does not support reentrant freezing. So calls like: myTreeExpansionMonitor.freeze(); myFilteringPanel.setShortcut(null); // triggers `filterTreeByShortcut` doSmth(); myTreeExpansionMonitor.restore(); did not work as expected, because `doSmth()` was performed without monitor state being frozen.
This commit is contained in:
@@ -330,11 +330,12 @@ public class KeymapPanel extends JPanel implements SearchableConfigurable, Confi
|
||||
}
|
||||
|
||||
private void filterTreeByShortcut(Shortcut shortcut) {
|
||||
myTreeExpansionMonitor.freeze();
|
||||
boolean wasFreezed = myTreeExpansionMonitor.isFreeze();
|
||||
if (!wasFreezed) myTreeExpansionMonitor.freeze();
|
||||
myActionsTree.filterTree(shortcut, myQuickLists);
|
||||
final JTree tree = myActionsTree.getTree();
|
||||
TreeUtil.expandAll(tree);
|
||||
myTreeExpansionMonitor.restore();
|
||||
if (!wasFreezed) myTreeExpansionMonitor.restore();
|
||||
}
|
||||
|
||||
public void showOption(String option) {
|
||||
|
||||
Reference in New Issue
Block a user