constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
386 stars 58 forks source link

fixed foreground icon schema resolve #2200

Closed antares1470 closed 2 months ago

antares1470 commented 2 months ago

Prerequisites

Description of the Change

The change made here (#2053) aimed to resolve the logic issue with how the foreground icon is resolved. As it turns out, the fix wasn't quite right as it made the assumption that any non-schema type would have a null foreground icon, whereas it actually had the default unknown icon. Since the icon was never null, the subsequent else if statement was never reached.

This PR fixes that logic so that rather first checking is the icon is null, it checks if the icons matches the default unknown icon

Alternate Designs

Why Should This Be In Core?

Fix a logic issue in Core

Benefits

Non-schema types can once again now have icons applied if there is an existing icon matching the type name + still adheres to checking schema first (which was the purpose of the original PR)

Possible Drawbacks

Verification Process

Applicable Issues

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud