提交 58365a89 编写于 作者: A Ahmed Ashour 提交者: skylot

fix(gui): remove tree children expansions as well (PR #630)

上级 172f7f75
......@@ -78,13 +78,26 @@ public class JadxProject {
public void removeTreeExpansion(String[] expansion) {
for (Iterator<String[]> it = treeExpansions.iterator(); it.hasNext(); ) {
if (Arrays.equals(it.next(), expansion)) {
if (isParentOfExpansion(expansion, it.next())) {
it.remove();
}
}
changed();
}
private boolean isParentOfExpansion(String[] parent, String[] child) {
if (Arrays.equals(parent, child)) {
return true;
}
for (int i = child.length - parent.length; i > 0; i--) {
String[] arr = Arrays.copyOfRange(child, i, child.length);
if (Arrays.equals(parent, arr)) {
return true;
}
}
return false;
}
private void changed() {
if (settings.isAutoSaveProject()) {
save();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册