Fixed errors while analyzing guitar wiring diagrams caused by treble bleed enhancements

This commit is contained in:
Bane Stojkovic
2026-06-14 20:48:12 +02:00
parent cc09c59fe5
commit 3425fff3a0
2 changed files with 10 additions and 4 deletions
@@ -433,6 +433,10 @@
<changeType>BUG_FIX</changeType>
<description>Fixed scaling for 'Image' and 'SVG Image' components; it was showing as undefined</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Fixed errors while analyzing guitar wiring diagrams caused by treble bleed enhancements</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
@@ -369,9 +369,11 @@ public class GuitarDiagramAnalyzer extends AbstractNetlistAnalyzer implements IN
notes.add(sb.toString());
TrebleBleed trebleBleed = volPotTrebleBleedMap.get(e.getKey());
String trebleBleedNote = trebleBleed.toNote(e.getKey());
if (trebleBleedNote != null && !trebleBleedNote.isEmpty()) {
notes.add(trebleBleedNote);
if (trebleBleed != null) {
String trebleBleedNote = trebleBleed.toNote(e.getKey());
if (trebleBleedNote != null && !trebleBleedNote.isEmpty()) {
notes.add(trebleBleedNote);
}
}
}
@@ -460,7 +462,7 @@ public class GuitarDiagramAnalyzer extends AbstractNetlistAnalyzer implements IN
parent1.getChildren().stream().filter(t -> !t.equals(tree1)).findFirst();
trebleTree.ifPresent(t -> {
// transcend one layer down if the tree is nested
while (t.getChildren().size() == 1 && t.getChildren().get(0).getLeaf() == null) {
while (t.getChildren() != null && t.getChildren().size() == 1 && t.getChildren().get(0).getLeaf() == null) {
t = t.getChildren().get(0);
}
Set<IDIYComponent<?>> trebleBleedComponents = t.extractComponents(ALL_TYPES);