Fix crash in printer config when switching tabs (#6537)

* Fix ASAN with MSVC

* Make ASAN happy

* Avoid deleting activated tab button by not calling `DeleteAllItems` (#SoftFever/OrcaSlicer#6486)
This commit is contained in:
Noisyfox 2024-08-23 22:55:10 +08:00 committed by GitHub
parent d1b9ef427e
commit a68fc86c4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 6 deletions

View file

@ -470,7 +470,7 @@ void PartPlate::calc_gridlines(const ExPolygon& poly, const BoundingBox& pp_bbox
int count = 0;
int step = 10;
// Orca: use 500 x 500 bed size as baseline.
auto grid_counts = pp_bbox.size() / ((coord_t) scale_(step * 50));
const Point grid_counts = pp_bbox.size() / ((coord_t) scale_(step * 50));
// if the grid is too dense, we increase the step
if (grid_counts.minCoeff() > 1) {
step = static_cast<int>(grid_counts.minCoeff() + 1) * 10;