Skip to content

Commit

Permalink
smh
Browse files Browse the repository at this point in the history
  • Loading branch information
sbxte committed Jan 28, 2024
1 parent 87ab85a commit 781a420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/mindustry/client/ui/SchematicBrowserDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,14 @@ void tagsChanged(){
}

public void pruneTags() {
selectedTags.clear();
tags.removeAll(t -> { // Remove tags not attached to any schematics
for (var ss: loadedRepositories.values()) {
if (ss.find(s -> s.labels.contains(t)) != null) return false;
}
return true;
});
tagsChanged();
}

void showAllTags(){
Expand Down
2 changes: 2 additions & 0 deletions core/src/mindustry/ui/dialogs/SchematicsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,9 @@ void showAllTags(){
}

public void pruneTags() {
selectedTags.clear();
tags.removeAll(t -> schematics.all().find(s -> s.labels.contains(t)) == null);
tagsChanged();
}

void deleteTag(String tag) {
Expand Down

0 comments on commit 781a420

Please sign in to comment.