From f7f4b28f7322552969850a032e64a5b1f91d18f8 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Fri, 21 Oct 2022 17:26:25 +0200 Subject: [PATCH] Change wxString to string --- src/slic3r/GUI/GUI_ObjectList.cpp | 8 ++++---- src/slic3r/GUI/GUI_ObjectList.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 9c554b056c..726a22ad78 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1738,7 +1738,7 @@ void ObjectList::load_shape_object(const std::string& type_name) // Create mesh BoundingBoxf3 bb; TriangleMesh mesh = create_mesh(type_name, bb); - load_mesh_object(mesh, _L("Shape") + "-" + _(type_name)); + load_mesh_object(mesh, _u8L("Shape") + "-" + type_name); #if ENABLE_RELOAD_FROM_DISK_REWORK if (!m_objects->empty()) m_objects->back()->volumes.front()->source.is_from_builtin_objects = true; @@ -1780,7 +1780,7 @@ void ObjectList::load_shape_object_from_gallery(const wxArrayString& input_files void ObjectList::load_mesh_object( const TriangleMesh & mesh, - const wxString & name, + const std::string & name, bool center, const TextConfiguration *text_config /* = nullptr*/, const Transform3d * transformation /* = nullptr*/) @@ -1794,12 +1794,12 @@ void ObjectList::load_mesh_object( std::vector object_idxs; ModelObject* new_object = model.add_object(); - new_object->name = into_u8(name); + new_object->name = name; new_object->add_instance(); // each object should have at list one instance ModelVolume* new_volume = new_object->add_volume(mesh); new_object->sort_volumes(wxGetApp().app_config->get("order_volumes") == "1"); - new_volume->name = into_u8(name); + new_volume->name = name; if (text_config) new_volume->text_configuration = *text_config; // set a default extruder value, since user can't add it manually diff --git a/src/slic3r/GUI/GUI_ObjectList.hpp b/src/slic3r/GUI/GUI_ObjectList.hpp index 17b6465445..173929e2d8 100644 --- a/src/slic3r/GUI/GUI_ObjectList.hpp +++ b/src/slic3r/GUI/GUI_ObjectList.hpp @@ -257,7 +257,7 @@ public: void load_shape_object(const std::string &type_name); void load_shape_object_from_gallery(); void load_shape_object_from_gallery(const wxArrayString& input_files); - void load_mesh_object(const TriangleMesh &mesh, const wxString &name, bool center = true, + void load_mesh_object(const TriangleMesh &mesh, const std::string &name, bool center = true, const TextConfiguration* text_config = nullptr, const Transform3d* transformation = nullptr); void del_object(const int obj_idx); void del_subobject_item(wxDataViewItem& item);