mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
fix a regression in layer time(log) view
This commit is contained in:
parent
da90e22b9f
commit
c9b20a0e10
1 changed files with 5 additions and 2 deletions
|
@ -257,9 +257,12 @@ GCodeViewer::Color GCodeViewer::Extrusions::Range::get_color_at(float value) con
|
||||||
{
|
{
|
||||||
// Input value scaled to the colors range
|
// Input value scaled to the colors range
|
||||||
const float step = step_size();
|
const float step = step_size();
|
||||||
if(log_scale)
|
float _min = min;
|
||||||
|
if(log_scale) {
|
||||||
value = std::log(value);
|
value = std::log(value);
|
||||||
const float global_t = (step != 0.0f) ? std::max(0.0f, value - min) / step : 0.0f; // lower limit of 0.0f
|
_min = std::log(min);
|
||||||
|
}
|
||||||
|
const float global_t = (step != 0.0f) ? std::max(0.0f, value - _min) / step : 0.0f; // lower limit of 0.0f
|
||||||
|
|
||||||
const size_t color_max_idx = Range_Colors.size() - 1;
|
const size_t color_max_idx = Range_Colors.size() - 1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue