improved tree

This commit is contained in:
bancika
2016-12-26 17:46:35 +01:00
parent ebb6a57ee8
commit 328cf0e9b7
2 changed files with 13 additions and 6 deletions
@@ -196,18 +196,21 @@ public class TreePanel extends JPanel {
Object obj = categoryNode.getUserObject();
if (obj != null && obj.getClass().equals(Payload.class)) {
Payload payload = (Payload) obj;
boolean visible = visibleCount > 0;
if (visible != payload.isVisible()) {
payload.setVisible(visible);
boolean categoryVisible = visibleCount > 0;
if (categoryVisible != payload.isVisible()) {
payload.setVisible(categoryVisible);
model.nodeStructureChanged(rootNode);
}
if (visible && text.trim().length() > 0) {
if (categoryVisible && text.trim().length() > 0) {
tree.expandPath(new TreePath(categoryNode.getPath()));
}
}
}
getTree().invalidate();
for (int i = 0; i < model.getChildCount(rootNode); i++) {
DefaultMutableTreeNode categoryNode = (DefaultMutableTreeNode) model.getChild(rootNode, i);
tree.expandPath(new TreePath(categoryNode.getPath()));
}
}
});
}
+4
View File
@@ -1454,6 +1454,10 @@
<releaseDate>2016-12-23 20:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Searchable toolbox tree instead of the old toolbar (can be changed from "Config" menu)</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>P-90 pickup in both "dog ear" and "soap bar" variations added</description>