Ensure proper colorer range for depth range
resolves #161
Will you please rebase the PR?
I am not sure I understand how to do it best. Colorers are transient, so that means we need to store either the scope or the calculated lowValue and highValue somewhere so they can be acessed by the depth colorer, correct? Colorer can be changed without redrawing the graph, so I didn't see a way to access scope from the depth colorer in that case.
The colorer is switched in a single place: https://github.com/asl/BandageNG/blob/dev/ui/mainwindow.cpp#L1364 (while it is currently in settings, it just it was not untangled fully from the global state, it really should belong to mainwindow, or rather we'd need to have UI Model speaking in MVVM terms).
So, you might want to check if the current scheme is coloring by depth, then cast interface to instance of DepthColorer and pass the scope there. The DepthColorer would recalculate min / max values then.
Is my latest approach in 91f7cf281d48974d1caa660d734d596e9667ccfd adequate? Along the way, in c31a7f993ddf52a18cdc2e7da118956669575160 I fixed the dependency issue that caused linux tests to fail as Ubuntu >24.04 image does not longer include imagemagick by default.
Sorry, got distracted to something else. Will check soon!