mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
NEW: set bed type when printing
Change-Id: I94b32e6264ecae4a8a6ca20eed0d08d13c6e391d Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
34ec55db80
commit
f3aa76e4c2
4 changed files with 16 additions and 3 deletions
|
@ -133,7 +133,7 @@ void PartPlate::init()
|
|||
m_print = nullptr;
|
||||
}
|
||||
|
||||
BedType PartPlate::get_bed_type() const
|
||||
BedType PartPlate::get_bed_type(bool load_from_project) const
|
||||
{
|
||||
std::string bed_type_key = "curr_bed_type";
|
||||
|
||||
|
@ -144,6 +144,12 @@ BedType PartPlate::get_bed_type() const
|
|||
return bed_type;
|
||||
}
|
||||
|
||||
if (!load_from_project || !wxGetApp().preset_bundle)
|
||||
return btDefault;
|
||||
|
||||
DynamicConfig& proj_cfg = wxGetApp().preset_bundle->project_config;
|
||||
if (proj_cfg.has(bed_type_key))
|
||||
return proj_cfg.opt_enum<BedType>(bed_type_key);
|
||||
return btDefault;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue