mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 15:19:03 +08:00
Inverted order of range items in legend texture
This commit is contained in:
parent
ad9dca2bd9
commit
a223655973
@ -370,7 +370,7 @@ GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std::
|
|||||||
list.reserve(Range::Colors_Count);
|
list.reserve(Range::Colors_Count);
|
||||||
|
|
||||||
float step = range.step_size();
|
float step = range.step_size();
|
||||||
for (unsigned int i = 0; i < Range::Colors_Count; ++i)
|
for (int i = Range::Colors_Count - 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
sprintf(buf, "%.*f/%.*f", decimals, scale_factor * (range.min + (float)i * step), decimals, scale_factor * (range.min + (float)(i + 1) * step));
|
sprintf(buf, "%.*f/%.*f", decimals, scale_factor * (range.min + (float)i * step), decimals, scale_factor * (range.min + (float)(i + 1) * step));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user