GUI_ObjectList: Get list of the loaded files before a taking of Undo/Redo snapshot
+ Fixed localization for the "Post processing" description line
This commit is contained in:
parent
93c4b941b5
commit
1955baa14b
3 changed files with 16 additions and 17 deletions
src/slic3r/GUI
|
@ -1398,6 +1398,18 @@ void ObjectList::load_subobject(ModelVolumeType type, bool from_galery/* = false
|
|||
if (m_objects_model->GetItemType(item)&itInstance)
|
||||
item = m_objects_model->GetItemById(obj_idx);
|
||||
|
||||
wxArrayString input_files;
|
||||
if (from_galery) {
|
||||
GalleryDialog dlg(this);
|
||||
if (dlg.ShowModal() != wxID_CLOSE)
|
||||
dlg.get_input_files(input_files);
|
||||
}
|
||||
else
|
||||
wxGetApp().import_model(wxGetApp().tab_panel()->GetPage(0), input_files);
|
||||
|
||||
if (input_files.IsEmpty())
|
||||
return;
|
||||
|
||||
take_snapshot((type == ModelVolumeType::MODEL_PART) ? _L("Load Part") : _L("Load Modifier"));
|
||||
|
||||
std::vector<ModelVolume*> volumes;
|
||||
|
@ -1406,7 +1418,7 @@ void ObjectList::load_subobject(ModelVolumeType type, bool from_galery/* = false
|
|||
if (type == ModelVolumeType::MODEL_PART)
|
||||
load_part(*(*m_objects)[obj_idx], volumes, type, from_galery);
|
||||
else*/
|
||||
load_modifier(*(*m_objects)[obj_idx], volumes, type, from_galery);
|
||||
load_modifier(input_files, *(*m_objects)[obj_idx], volumes, type, from_galery);
|
||||
|
||||
if (volumes.empty())
|
||||
return;
|
||||
|
@ -1486,7 +1498,7 @@ void ObjectList::load_part(ModelObject& model_object, std::vector<ModelVolume*>&
|
|||
}
|
||||
}
|
||||
*/
|
||||
void ObjectList::load_modifier(ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery)
|
||||
void ObjectList::load_modifier(const wxArrayString& input_files, ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery)
|
||||
{
|
||||
// ! ysFIXME - delete commented code after testing and rename "load_modifier" to something common
|
||||
//if (type == ModelVolumeType::MODEL_PART)
|
||||
|
@ -1494,19 +1506,6 @@ void ObjectList::load_modifier(ModelObject& model_object, std::vector<ModelVolum
|
|||
|
||||
wxWindow* parent = wxGetApp().tab_panel()->GetPage(0);
|
||||
|
||||
wxArrayString input_files;
|
||||
|
||||
if (from_galery) {
|
||||
GalleryDialog dlg(this);
|
||||
if (dlg.ShowModal() == wxID_CLOSE)
|
||||
return;
|
||||
dlg.get_input_files(input_files);
|
||||
if (input_files.IsEmpty())
|
||||
return;
|
||||
}
|
||||
else
|
||||
wxGetApp().import_model(parent, input_files);
|
||||
|
||||
wxProgressDialog dlg(_L("Loading") + dots, "", 100, wxGetApp().mainframe, wxPD_AUTO_HIDE);
|
||||
wxBusyCursor busy;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue