mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r into opengl_to_cpp
This commit is contained in:
commit
a7e9ec5757
9 changed files with 219 additions and 42 deletions
|
@ -411,16 +411,27 @@ GLCanvas3D::Bed::EType GLCanvas3D::Bed::_detect_type() const
|
|||
const PresetBundle* bundle = get_preset_bundle();
|
||||
if (bundle != nullptr)
|
||||
{
|
||||
const Preset& curr = bundle->printers.get_selected_preset();
|
||||
if (curr.config.has("bed_shape") && _are_equal(m_shape, dynamic_cast<const ConfigOptionPoints*>(curr.config.option("bed_shape"))->values))
|
||||
const Preset* curr = &bundle->printers.get_selected_preset();
|
||||
while (curr != nullptr)
|
||||
{
|
||||
if ((curr.vendor != nullptr) && (curr.vendor->name == "Prusa Research"))
|
||||
if (curr->config.has("bed_shape") && _are_equal(m_shape, dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values))
|
||||
{
|
||||
if (boost::contains(curr.name, "MK2"))
|
||||
type = MK2;
|
||||
else if (boost::contains(curr.name, "MK3"))
|
||||
type = MK3;
|
||||
if ((curr->vendor != nullptr) && (curr->vendor->name == "Prusa Research"))
|
||||
{
|
||||
if (boost::contains(curr->name, "MK2"))
|
||||
{
|
||||
type = MK2;
|
||||
break;
|
||||
}
|
||||
else if (boost::contains(curr->name, "MK3"))
|
||||
{
|
||||
type = MK3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
curr = bundle->printers.get_preset_parent(*curr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <wx/image.h>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -27,6 +29,9 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap
|
|||
{
|
||||
reset();
|
||||
|
||||
if (!boost::filesystem::exists(filename))
|
||||
return false;
|
||||
|
||||
// Load a PNG with an alpha channel.
|
||||
wxImage image;
|
||||
if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG))
|
||||
|
|
|
@ -28,6 +28,8 @@ struct MsgDialog : wxDialog
|
|||
MsgDialog &operator=(const MsgDialog &) = delete;
|
||||
virtual ~MsgDialog();
|
||||
|
||||
// TODO: refactor with CreateStdDialogButtonSizer usage
|
||||
|
||||
protected:
|
||||
enum {
|
||||
CONTENT_WIDTH = 500,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue