mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 08:11:14 +00:00
Preview: reuse a belt print's toolpaths until the view is toggled
load_as_gcode() skips the conversion and GPU upload when it is handed the result it already shows, but belt printers were exempt from that cache, because the designed/raw view changes the toolpath geometry for the same result. So every preview reload of a belt print, switching back to the Preview tab for one, converted and uploaded every toolpath again. Remember the view the result was converted for and reuse it while both match. Toggling the view (B, the legend checkbox, the toolbar menu) still converts again. The print config the back-transform reads cannot change without a new G-code result, so the result id covers it as it does on any other printer. Suggested by raistlin7447 on #14394.
This commit is contained in:
@@ -199,6 +199,8 @@ private:
|
||||
std::vector<int> m_plater_extruder;
|
||||
bool m_gl_data_initialized{ false };
|
||||
unsigned int m_last_result_id{ 0 };
|
||||
// Belt printers: the view the loaded result was converted for (see load_as_gcode).
|
||||
bool m_last_belt_show_designed{ true };
|
||||
//BBS: save m_gcode_result as well
|
||||
const GCodeProcessorResult* m_gcode_result;
|
||||
std::array<unsigned int, static_cast<size_t>(EMoveType::Count)> m_move_type_counts{};
|
||||
|
||||
Reference in New Issue
Block a user