diff options
author | YuSanka <yusanka@gmail.com> | 2019-12-17 10:37:50 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-12-17 10:37:50 +0300 |
commit | afcc6bbb08b9a774614b1746bf2c843319ccd0aa (patch) | |
tree | c4c87c2a6604b9e0ac6927f465755b2bfdf3a00d /src/slic3r/GUI/wxExtensions.hpp | |
parent | 7b1e96fe7f6796c7bebfb7f85b3ddd483c88e655 (diff) |
Code refactoring for Color change implementation
Diffstat (limited to 'src/slic3r/GUI/wxExtensions.hpp')
-rw-r--r-- | src/slic3r/GUI/wxExtensions.hpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp index 7841b62fe..9b7de93cd 100644 --- a/src/slic3r/GUI/wxExtensions.hpp +++ b/src/slic3r/GUI/wxExtensions.hpp @@ -17,6 +17,7 @@ #include <set> #include <functional> #include "libslic3r/Model.hpp" +#include "libslic3r/GCodeWriter.hpp" namespace Slic3r { enum class ModelVolumeType : int; @@ -958,24 +959,12 @@ private: struct TICK_CODE { - TICK_CODE(int tick):tick(tick), gcode(Slic3r::ColorChangeCode), extruder(0), color("") {} - TICK_CODE(int tick, const std::string& code) : - tick(tick), gcode(code), extruder(0) {} - TICK_CODE(int tick, int extruder) : - tick(tick), gcode(Slic3r::ColorChangeCode), extruder(extruder) {} - TICK_CODE(int tick, const std::string& code, int extruder, const std::string& color) : - tick(tick), gcode(code), extruder(extruder), color(color) {} - bool operator<(const TICK_CODE& other) const { return other.tick > this->tick; } bool operator>(const TICK_CODE& other) const { return other.tick < this->tick; } - TICK_CODE operator=(const TICK_CODE& other) const { - TICK_CODE ret_val(other.tick, other.gcode, other.extruder, other.color); - return ret_val; - } int tick; - std::string gcode; - int extruder; + std::string gcode = Slic3r::ColorChangeCode; + int extruder = 0; std::string color; }; |