ScopeView: if custom file node is updated, always notify that structure changed

This commit is contained in:
Sergey Malenkov
2018-03-26 19:49:47 +03:00
parent c4f3c7dd6e
commit 9828dd0ca9
@@ -205,10 +205,11 @@ public final class ScopeViewTreeModel extends BaseTreeModel<AbstractTreeNode> im
private void update(@NotNull AbstractTreeNode node, boolean structure) {
model.onValidThread(() -> {
boolean updated = node.update();
if (!updated && !structure) return;
boolean changed = structure || !(node instanceof Node);
if (!updated && !changed) return;
TreePath path = TreePathUtil.pathToCustomNode(node, AbstractTreeNode::getParent);
if (path == null || root != path.getPathComponent(0)) return;
if (structure) {
if (changed) {
LOG.debug("structure changed: ", node);
treeStructureChanged(path, null, null);
}