mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
DoubleSlider:colored_band: Fixed get a correct color for extruder, when it's changed from Settings Tab
This commit is contained in:
parent
1399696b04
commit
3ffc565722
4 changed files with 22 additions and 8 deletions
|
@ -95,6 +95,8 @@ class TickCodeInfo
|
|||
bool m_use_default_colors= false;
|
||||
int m_default_color_idx = 0;
|
||||
|
||||
std::vector<std::string>* m_colors {nullptr};
|
||||
|
||||
std::string get_color_for_tick(TickCode tick, const std::string& code, const int extruder);
|
||||
|
||||
public:
|
||||
|
@ -122,6 +124,8 @@ public:
|
|||
bool suppressed_plus () { return m_suppress_plus; }
|
||||
bool suppressed_minus() { return m_suppress_minus; }
|
||||
void set_default_colors(bool default_colors_on) { m_use_default_colors = default_colors_on; }
|
||||
|
||||
void set_extruder_colors(std::vector<std::string>* extruder_colors) { m_colors = extruder_colors; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -209,6 +213,7 @@ public:
|
|||
void SetManipulationMode(t_mode mode) { m_mode = mode; }
|
||||
t_mode GetManipulationMode() const { return m_mode; }
|
||||
void SetModeAndOnlyExtruder(const bool is_one_extruder_printed_model, const int only_extruder);
|
||||
void SetExtruderColors(const std::vector<std::string>& extruder_colors);
|
||||
|
||||
bool is_horizontal() const { return m_style == wxSL_HORIZONTAL; }
|
||||
bool is_one_layer() const { return m_is_one_layer; }
|
||||
|
@ -357,6 +362,8 @@ private:
|
|||
std::vector<double> m_values;
|
||||
TickCodeInfo m_ticks;
|
||||
|
||||
std::vector<std::string> m_extruder_colors;
|
||||
|
||||
// control's view variables
|
||||
wxCoord SLIDER_MARGIN; // margin around slider
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue