mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 20:15:59 +08:00
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
@ -1398,6 +1398,18 @@ void ObjectList::load_subobject(ModelVolumeType type, bool from_galery/* = false
|
|||||||
if (m_objects_model->GetItemType(item)&itInstance)
|
if (m_objects_model->GetItemType(item)&itInstance)
|
||||||
item = m_objects_model->GetItemById(obj_idx);
|
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"));
|
take_snapshot((type == ModelVolumeType::MODEL_PART) ? _L("Load Part") : _L("Load Modifier"));
|
||||||
|
|
||||||
std::vector<ModelVolume*> volumes;
|
std::vector<ModelVolume*> volumes;
|
||||||
@ -1406,7 +1418,7 @@ void ObjectList::load_subobject(ModelVolumeType type, bool from_galery/* = false
|
|||||||
if (type == ModelVolumeType::MODEL_PART)
|
if (type == ModelVolumeType::MODEL_PART)
|
||||||
load_part(*(*m_objects)[obj_idx], volumes, type, from_galery);
|
load_part(*(*m_objects)[obj_idx], volumes, type, from_galery);
|
||||||
else*/
|
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())
|
if (volumes.empty())
|
||||||
return;
|
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
|
// ! ysFIXME - delete commented code after testing and rename "load_modifier" to something common
|
||||||
//if (type == ModelVolumeType::MODEL_PART)
|
//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);
|
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);
|
wxProgressDialog dlg(_L("Loading") + dots, "", 100, wxGetApp().mainframe, wxPD_AUTO_HIDE);
|
||||||
wxBusyCursor busy;
|
wxBusyCursor busy;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ public:
|
|||||||
void load_subobject(ModelVolumeType type, bool from_galery = false);
|
void load_subobject(ModelVolumeType type, bool from_galery = false);
|
||||||
// ! ysFIXME - delete commented code after testing and rename "load_modifier" to something common
|
// ! ysFIXME - delete commented code after testing and rename "load_modifier" to something common
|
||||||
//void load_part(ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery = false);
|
//void load_part(ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery = false);
|
||||||
void load_modifier(ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery = false);
|
void load_modifier(const wxArrayString& input_files, ModelObject& model_object, std::vector<ModelVolume*>& added_volumes, ModelVolumeType type, bool from_galery = false);
|
||||||
void load_generic_subobject(const std::string& type_name, const ModelVolumeType type);
|
void load_generic_subobject(const std::string& type_name, const ModelVolumeType type);
|
||||||
void load_shape_object(const std::string &type_name);
|
void load_shape_object(const std::string &type_name);
|
||||||
void load_shape_object_from_gallery();
|
void load_shape_object_from_gallery();
|
||||||
|
@ -1743,7 +1743,7 @@ void TabPrint::update_description_lines()
|
|||||||
|
|
||||||
if (m_active_page && m_active_page->title() == "Output options" && m_post_process_explanation) {
|
if (m_active_page && m_active_page->title() == "Output options" && m_post_process_explanation) {
|
||||||
m_post_process_explanation->SetText(
|
m_post_process_explanation->SetText(
|
||||||
_u8L("Post processing scripts shall modify G-code file in place."));
|
_L("Post processing scripts shall modify G-code file in place."));
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
m_post_process_explanation->SetPathEnd("post-processing-scripts_283913");
|
m_post_process_explanation->SetPathEnd("post-processing-scripts_283913");
|
||||||
#endif // __linux__
|
#endif // __linux__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user