mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Remap paint after reload from disk
This commit is contained in:
@@ -8880,6 +8880,16 @@ void Plater::priv::reload_from_disk()
|
||||
new_volume->convert_from_imperial_units();
|
||||
else if (old_volume->source.is_converted_from_meters)
|
||||
new_volume->convert_from_meters();
|
||||
|
||||
// Remap paint
|
||||
if (wxGetApp().app_config->get_bool("keep_painting")) {
|
||||
auto saved_painting = old_volume->save_painting();
|
||||
if (saved_painting) {
|
||||
saved_painting->mesh.transform(Geometry::translation_transform(new_volume->mesh().get_init_shift()));
|
||||
new_volume->restore_painting(saved_painting);
|
||||
}
|
||||
}
|
||||
|
||||
std::swap(old_model_object->volumes[vol_idx], old_model_object->volumes.back());
|
||||
old_model_object->delete_volume(old_model_object->volumes.size() - 1);
|
||||
if (!sinking) old_model_object->ensure_on_bed();
|
||||
|
||||
Reference in New Issue
Block a user