Closed tischi closed 2 years ago
Or maybe we don't do this on purpose such that one can trigger the repaint somewhere else more efficiently?
Not sure if it's done on purpose, but you can repaint all windows which contains a certain source by calling
And what's your feeling? Should we add this to the ColorChanger
?
It would be convenient, however if you change the color of many sac it might be more efficient to first change all their colors and only then trigger the update of the display...
Right, maybe for efficiency, we should trigger it in the command, but not in color changer.
One line needs to be added here: https://github.com/bigdataviewer/bigdataviewer-playground/blob/d0db4c18218bb744f464de5167fd279eea873cf6/src/main/java/sc/fiji/bdvpg/scijava/command/source/SourceColorChangerCommand.java#L54
@NicoKiaru I made a PR. Please close this issue in case you gonna merge it.
Perfect, thanks!
PR for reference: https://github.com/bigdataviewer/bigdataviewer-playground/pull/243
@NicoKiaru For me, changing a color with the ColorChanger does not trigger a bdv.repaint().
Currently we have those lines of code:
Maybe that's not enough? Maybe we also need to find all the bdvHandle where the sac is displayed and trigger a repaint there?