mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-26 06:24:26 +08:00
Bed textures selection using config inheritance
This commit is contained in:
parent
b386f52acc
commit
80e4155cbc
@ -405,16 +405,27 @@ GLCanvas3D::Bed::EType GLCanvas3D::Bed::_detect_type() const
|
|||||||
const PresetBundle* bundle = get_preset_bundle();
|
const PresetBundle* bundle = get_preset_bundle();
|
||||||
if (bundle != nullptr)
|
if (bundle != nullptr)
|
||||||
{
|
{
|
||||||
const Preset& curr = bundle->printers.get_selected_preset();
|
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))
|
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"))
|
if ((curr->vendor != nullptr) && (curr->vendor->name == "Prusa Research"))
|
||||||
type = MK2;
|
{
|
||||||
else if (boost::contains(curr.name, "MK3"))
|
if (boost::contains(curr->name, "MK2"))
|
||||||
type = MK3;
|
{
|
||||||
|
type = MK2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (boost::contains(curr->name, "MK3"))
|
||||||
|
{
|
||||||
|
type = MK3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curr = bundle->printers.get_preset_parent(*curr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user