GCode Preview - Fixed values in range labels of legend texture

This commit is contained in:
Enrico Turri 2018-03-06 12:12:00 +01:00
parent 6dd241921f
commit d91f59379b
3 changed files with 60 additions and 15 deletions

View file

@ -37,6 +37,7 @@ public:
void reset();
bool empty() const;
void update_from(float value);
void update_from(const Range& other);
void set_from(const Range& other);
float step_size() const;
@ -44,6 +45,13 @@ public:
const Color& get_color_at_max() const;
};
struct Ranges
{
Range height;
Range width;
Range feedrate;
};
struct LegendItem
{
std::string text;
@ -71,13 +79,6 @@ public:
static const std::string Default_Extrusion_Role_Names[Num_Extrusion_Roles];
static const EViewType Default_View_Type;
struct Ranges
{
Range height;
Range width;
Range feedrate;
};
struct Layer
{
float z;
@ -140,6 +141,7 @@ public:
float height;
Color type_colors[Num_Types];
bool is_visible;
Ranges ranges;
void set_default();
};