mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Get rid of unnecessary double calling of TriangleSelector::reset() in some cases when TriangleSelector::deserialize() is called.
This commit is contained in:
parent
2569da95d5
commit
38866b65b0
6 changed files with 14 additions and 8 deletions
|
@ -1393,9 +1393,10 @@ std::pair<std::vector<std::pair<int, int>>, std::vector<bool>> TriangleSelector:
|
|||
return out.data;
|
||||
}
|
||||
|
||||
void TriangleSelector::deserialize(const std::pair<std::vector<std::pair<int, int>>, std::vector<bool>> &data)
|
||||
void TriangleSelector::deserialize(const std::pair<std::vector<std::pair<int, int>>, std::vector<bool>> &data, bool needs_reset)
|
||||
{
|
||||
reset(); // dump any current state
|
||||
if (needs_reset)
|
||||
reset(); // dump any current state
|
||||
|
||||
// Reserve number of triangles as if each triangle was saved with 4 bits.
|
||||
// With MMU painting this estimate may be somehow low, but better than nothing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue