Skip to content

Commit bb3c157

Browse files
committed
Remove hidden or grouped items
1 parent 1a0f65e commit bb3c157

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/creature/ThumbnailImage.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ public Bounds getSellectedBounds() {
7171
public WritableImage get(CSGDatabaseInstance instance, List<CSG> c) {
7272
ArrayList<CSG> csgList = new ArrayList<CSG>();
7373
for (CSG cs : c) {
74-
if (csgs.containsKey(cs.getName()))
75-
continue;
74+
boolean containsKey = csgs.containsKey(cs.getName());
7675
csgs.put(cs.getName(), cs);
76+
if (containsKey)
77+
continue;
7778
if (cs.hasManipulator()) {
7879
TransformNR nr;
7980
try {
@@ -89,10 +90,12 @@ public WritableImage get(CSGDatabaseInstance instance, List<CSG> c) {
8990
ArrayList<String> toRemove = new ArrayList<String>();
9091
for (String s : csgs.keySet()) {
9192
boolean exists = false;
92-
for (CSG cs : c) {
93-
if (cs.getName().contentEquals(s))
94-
exists = true;
95-
}
93+
if (!(csgs.get(s).isHide()||csgs.get(s).isInGroup()))
94+
for (CSG cs : c) {
95+
if (cs.getName().contentEquals(s)) {
96+
exists = true;
97+
}
98+
}
9699
if (!exists) {
97100
toRemove.add(s);
98101
}

0 commit comments

Comments
 (0)