Fixing build against wxWidgets 3.0

The wxString saga continues. wxWidgets 3.0 don't have the wxString::FromUTF8(const std::string&) overload, we must use the GUI::from_u8 helper
Also wxWidgets 3.0 don't allow to disable wxString->const char* conversion, so calling show_info(wxWindow*, wxString, const char*) was ambiguous
Several includes moved around
This commit is contained in:
Lukas Matena 2020-03-04 09:24:13 +01:00
parent a87ba5d6a6
commit eb3b65d8af
15 changed files with 28 additions and 22 deletions

View file

@ -3,6 +3,7 @@
#include "GLCanvas3D.hpp"
#include "GUI_App.hpp"
#include "GUI.hpp"
#include "GUI_ObjectManipulation.hpp"
#include "GUI_ObjectList.hpp"
#include "Gizmos/GLGizmoBase.hpp"
@ -1470,7 +1471,7 @@ void Selection::toggle_instance_printable_state()
ModelInstance* instance = model_object->instances[instance_idx];
const bool printable = !instance->printable;
wxString snapshot_text = model_object->instances.size() == 1 ? wxString::FromUTF8((boost::format("%1% %2%")
wxString snapshot_text = model_object->instances.size() == 1 ? from_u8((boost::format("%1% %2%")
% (printable ? _utf8(L("Set Printable")) : _utf8(L("Set Unprintable")))
% model_object->name).str()) :
(printable ? _(L("Set Printable Instance")) : _(L("Set Unprintable Instance")));