-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Reproduce:
- Draw rectangle
- Edit label color of the rectangle
- Save state file
- Refresh and load state file
- Bug: Rectangle color is not your edited color, its the default.
Approach?
Bug was introduced with this code block:
VolView/src/store/tools/useAnnotationTool.ts
Lines 194 to 197 in 1a82091
| // prioritize existing labels (from configJSON most likely) | |
| .map(([id, label]) => { | |
| return labels.findLabel(label.labelName) ?? ([id, label] as const); | |
| }) |
That code will wrongly ignore property changes of deserialized labels that have the same name of default labels. To support config.JSON files over-riding session.zip files, could do a sort here:
VolView/src/io/import/importDataSources.ts
Lines 86 to 88 in 1a82091
| const results = await Promise.all( | |
| dataSources.map((r) => pipeline.execute(r, importContext)) | |
| ); |
Add a postResource ImportHandler that collects up config.JSONs and runs them after session.zip has been processed?
The other (more hacky) fix would be to add some state asssoated with config.JSON labels so they take priority when a tool deserialzied its labels.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working