Display the expected preset name for the mismatched geometry issue messages (close #8018)

This commit is contained in:
Quincy Morgan
2020-09-24 08:58:45 -04:00
parent 73a826cefc
commit 9effdf9724
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -216,13 +216,15 @@ export function utilDisplayType(id) {
}
export function utilDisplayLabel(entity, graph) {
export function utilDisplayLabel(entity, graphOrGeometry) {
var displayName = utilDisplayName(entity);
if (displayName) {
// use the display name if there is one
return displayName;
}
var preset = presetManager.match(entity, graph);
var preset = typeof graphOrGeometry === 'string' ?
presetManager.matchTags(entity.tags, graphOrGeometry) :
presetManager.match(entity, graphOrGeometry);
if (preset && preset.name()) {
// use the preset name if there is a match
return preset.name();