Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2018-09-19 11:34:21 +0300
committerVojtech Kral <vojtech@kral.hk>2018-09-19 11:55:00 +0300
commit51d504c7202488b57aa0710369f5240952ff3a0e (patch)
tree15a209c8eb799e4db4c311b5ae8e0b62294a2c14 /xs
parente695164451963938eaf8bced5a56fed888b8f4d5 (diff)
Build fixes, conversion of wxString into utf-8 std::string
Diffstat (limited to 'xs')
-rw-r--r--xs/src/libslic3r/PrintExport.hpp4
-rw-r--r--xs/src/libslic3r/SupportMaterial.cpp5
-rw-r--r--xs/src/slic3r/GUI/GUI.cpp6
-rw-r--r--xs/src/slic3r/GUI/GUI.hpp2
-rw-r--r--xs/src/slic3r/GUI/GUI_Preview.cpp8
5 files changed, 19 insertions, 6 deletions
diff --git a/xs/src/libslic3r/PrintExport.hpp b/xs/src/libslic3r/PrintExport.hpp
index 8286b7165..4de12d3c2 100644
--- a/xs/src/libslic3r/PrintExport.hpp
+++ b/xs/src/libslic3r/PrintExport.hpp
@@ -81,8 +81,8 @@ template<class Backend> class Zipper {
public:
Zipper(const std::string& /*zipfile_path*/) {
- static_assert(Backend>::value,
- "No zipper implementation provided!");
+ // static_assert(Backend>::value,
+ // "No zipper implementation provided!");
}
void next_entry(const std::string& /*fname*/) {}
diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp
index 2bcf597e6..bd1a9f3fb 100644
--- a/xs/src/libslic3r/SupportMaterial.cpp
+++ b/xs/src/libslic3r/SupportMaterial.cpp
@@ -2618,7 +2618,10 @@ void modulate_extrusion_by_overlapping_layers(
(fragment_end.is_start ? &polyline.points.front() : &polyline.points.back());
}
private:
- ExtrusionPathFragmentEndPointAccessor& operator=(const ExtrusionPathFragmentEndPointAccessor&) {}
+ ExtrusionPathFragmentEndPointAccessor& operator=(const ExtrusionPathFragmentEndPointAccessor&) {
+ return *this;
+ }
+
const std::vector<ExtrusionPathFragment> &m_path_fragments;
};
const coord_t search_radius = 7;
diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp
index 24d459921..e5ed917b3 100644
--- a/xs/src/slic3r/GUI/GUI.cpp
+++ b/xs/src/slic3r/GUI/GUI.cpp
@@ -991,6 +991,12 @@ wxString from_u8(const std::string &str)
return wxString::FromUTF8(str.c_str());
}
+std::string into_u8(const wxString &str)
+{
+ auto buffer_utf8 = str.utf8_str();
+ return std::string(buffer_utf8.data());
+}
+
void set_model_events_from_perl(Model &model,
int event_object_selection_changed,
int event_object_settings_changed,
diff --git a/xs/src/slic3r/GUI/GUI.hpp b/xs/src/slic3r/GUI/GUI.hpp
index 8dfaf42c6..cbf83aa94 100644
--- a/xs/src/slic3r/GUI/GUI.hpp
+++ b/xs/src/slic3r/GUI/GUI.hpp
@@ -217,6 +217,8 @@ int combochecklist_get_flags(wxComboCtrl* comboCtrl);
wxString L_str(const std::string &str);
// Return wxString from std::string in UTF8
wxString from_u8(const std::string &str);
+// Return std::string in UTF8 from wxString
+std::string into_u8(const wxString &str);
void set_model_events_from_perl(Model &model,
int event_object_selection_changed,
diff --git a/xs/src/slic3r/GUI/GUI_Preview.cpp b/xs/src/slic3r/GUI/GUI_Preview.cpp
index 50d404e78..bfc8b5623 100644
--- a/xs/src/slic3r/GUI/GUI_Preview.cpp
+++ b/xs/src/slic3r/GUI/GUI_Preview.cpp
@@ -99,8 +99,9 @@ bool Preview::init(wxNotebook* notebook, DynamicPrintConfig* config, Print* prin
m_combochecklist_features = new wxComboCtrl();
m_combochecklist_features->Create(this, wxID_ANY, _(L("Feature types")), wxDefaultPosition, wxSize(200, -1), wxCB_READONLY);
- std::string feature_text = _(L("Feature types"));
- std::string feature_items = _(L("Perimeter")) + "|" +
+ std::string feature_text = GUI::into_u8(_(L("Feature types")));
+ std::string feature_items = GUI::into_u8(
+ _(L("Perimeter")) + "|" +
_(L("External perimeter")) + "|" +
_(L("Overhang perimeter")) + "|" +
_(L("Internal infill")) + "|" +
@@ -112,7 +113,8 @@ bool Preview::init(wxNotebook* notebook, DynamicPrintConfig* config, Print* prin
_(L("Support material")) + "|" +
_(L("Support material interface")) + "|" +
_(L("Wipe tower")) + "|" +
- _(L("Custom"));
+ _(L("Custom"))
+ );
Slic3r::GUI::create_combochecklist(m_combochecklist_features, feature_text, feature_items, true);
m_checkbox_travel = new wxCheckBox(this, wxID_ANY, _(L("Travel")));