Skip to content
Snippets Groups Projects
Commit 740e05a3 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

no need to adapt splitpane when expanded state did not change

parent 7e8f2555
No related branches found
No related tags found
No related merge requests found
......@@ -89,6 +89,7 @@ public class ConfigurationTree extends ExpandableTree {
@Override
protected void setExpandedState(TreePath path, boolean state) {
boolean changed = (!hasBeenExpanded(path)) || (state != isExpanded(path));
super.setExpandedState(path, state);
// Hack to update JPopupMenu best size, when this tree is in a JMenu.
revalidate();
......@@ -97,6 +98,7 @@ public class ConfigurationTree extends ExpandableTree {
while (parent != null && !(parent instanceof JPopupMenu)) {
parent = parent.getParent();
}
if (changed) {
if (parent instanceof JPopupMenu) {
JPopupMenu window = (JPopupMenu) parent;
if (window.isShowing()) {
......@@ -115,6 +117,7 @@ public class ConfigurationTree extends ExpandableTree {
}
}
}
}
// ///////////// //
// Inner classes //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment