mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 01:15:53 +08:00
Keep selection after reload from disk
This commit is contained in:
parent
d6c3c766aa
commit
a7a01bfc72
@ -3080,7 +3080,7 @@ void Plater::priv::reload_from_disk()
|
||||
{
|
||||
Plater::TakeSnapshot snapshot(q, _(L("Reload from Disk")));
|
||||
|
||||
const auto &selection = get_selection();
|
||||
auto& selection = get_selection();
|
||||
const auto obj_orig_idx = selection.get_object_idx();
|
||||
if (selection.is_wipe_tower() || obj_orig_idx == -1) { return; }
|
||||
|
||||
@ -3107,6 +3107,14 @@ void Plater::priv::reload_from_disk()
|
||||
}
|
||||
|
||||
remove(obj_orig_idx);
|
||||
|
||||
// the previous call to remove() clears the selection
|
||||
// select newly added objects
|
||||
selection.clear();
|
||||
for (const auto idx : new_idxs)
|
||||
{
|
||||
selection.add_object((unsigned int)idx - 1, false);
|
||||
}
|
||||
}
|
||||
|
||||
void Plater::priv::fix_through_netfabb(const int obj_idx, const int vol_idx/* = -1*/)
|
||||
|
Loading…
x
Reference in New Issue
Block a user