mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 11:47:54 -06:00
FIX: crash at fix model (Studio-1482)
deselect all objects when select plate in objectList. https://jira.bambooolab.com/browse/STUDIO-1482 Change-Id: I3660108ba1d8f369afd5058f086cb7daf306ea59
This commit is contained in:
parent
a86d94f2c9
commit
289a3d1d53
1 changed files with 13 additions and 6 deletions
|
@ -155,6 +155,7 @@ ObjectList::ObjectList(wxWindow* parent) :
|
|||
ObjectDataViewModelNode* sel_node = (ObjectDataViewModelNode*)event.GetItem().GetID();
|
||||
if (sel_node && (sel_node->GetType() & ItemType::itPlate)) {
|
||||
wxGetApp().plater()->select_plate(sel_node->GetPlateIdx());
|
||||
wxGetApp().plater()->deselect_all();
|
||||
}
|
||||
else {
|
||||
selection_changed();
|
||||
|
@ -4690,17 +4691,20 @@ void ObjectList::fix_through_netfabb()
|
|||
obj_idxs.erase(obj_idxs.begin()+i);
|
||||
#endif // FIX_THROUGH_NETFABB_ALWAYS
|
||||
for (int obj_idx : obj_idxs)
|
||||
model_names.push_back(object(obj_idx)->name);
|
||||
if (object(obj_idx))
|
||||
model_names.push_back(object(obj_idx)->name);
|
||||
}
|
||||
else {
|
||||
ModelObject* obj = object(obj_idxs.front());
|
||||
if (obj) {
|
||||
#if !FIX_THROUGH_NETFABB_ALWAYS
|
||||
for (int i = int(vol_idxs.size()) - 1; i >= 0; --i)
|
||||
if (obj->get_repaired_errors_count(vol_idxs[i]) == 0)
|
||||
vol_idxs.erase(vol_idxs.begin() + i);
|
||||
for (int i = int(vol_idxs.size()) - 1; i >= 0; --i)
|
||||
if (obj->get_repaired_errors_count(vol_idxs[i]) == 0)
|
||||
vol_idxs.erase(vol_idxs.begin() + i);
|
||||
#endif // FIX_THROUGH_NETFABB_ALWAYS
|
||||
for (int vol_idx : vol_idxs)
|
||||
model_names.push_back(obj->volumes[vol_idx]->name);
|
||||
for (int vol_idx : vol_idxs)
|
||||
model_names.push_back(obj->volumes[vol_idx]->name);
|
||||
}
|
||||
}
|
||||
|
||||
auto plater = wxGetApp().plater();
|
||||
|
@ -4711,6 +4715,9 @@ void ObjectList::fix_through_netfabb()
|
|||
std::vector<std::string>& succes_models,
|
||||
std::vector<std::pair<std::string, std::string>>& failed_models)
|
||||
{
|
||||
if (!object(obj_idx))
|
||||
return false;
|
||||
|
||||
const std::string& model_name = model_names[model_idx];
|
||||
wxString msg = _L("Repairing model object");
|
||||
if (model_names.size() == 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue