mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 04:22:04 +08:00
Fix SPE-2642: Select the bed the currently painted on instance is on when doing automatic painting (#13952)
This commit is contained in:
parent
8fc4e241d3
commit
cf7a01b3f0
@ -7,6 +7,7 @@
|
|||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
|
|
||||||
//#include "slic3r/GUI/3DScene.hpp"
|
//#include "slic3r/GUI/3DScene.hpp"
|
||||||
|
#include "libslic3r/MultipleBeds.hpp"
|
||||||
#include "libslic3r/SupportSpotsGenerator.hpp"
|
#include "libslic3r/SupportSpotsGenerator.hpp"
|
||||||
#include "libslic3r/TriangleSelectorWrapper.hpp"
|
#include "libslic3r/TriangleSelectorWrapper.hpp"
|
||||||
#include "slic3r/GUI/GLCanvas3D.hpp"
|
#include "slic3r/GUI/GLCanvas3D.hpp"
|
||||||
@ -534,6 +535,14 @@ void GLGizmoFdmSupports::auto_generate()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto first_instance_bed{s_multiple_beds.get_inst_map().find(mo->instances.front()->id())};
|
||||||
|
if (
|
||||||
|
first_instance_bed != s_multiple_beds.get_inst_map().end()
|
||||||
|
&& s_multiple_beds.get_active_bed() != first_instance_bed->second
|
||||||
|
) {
|
||||||
|
s_multiple_beds.set_active_bed(first_instance_bed->second);
|
||||||
|
}
|
||||||
|
|
||||||
bool not_painted = std::all_of(mo->volumes.begin(), mo->volumes.end(), [](const ModelVolume* vol){
|
bool not_painted = std::all_of(mo->volumes.begin(), mo->volumes.end(), [](const ModelVolume* vol){
|
||||||
return vol->type() != ModelVolumeType::MODEL_PART || vol->supported_facets.empty();
|
return vol->type() != ModelVolumeType::MODEL_PART || vol->supported_facets.empty();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user