mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: reload bed_texture should reset before
Jira: STUDIO-4574 Change-Id: I0bfe8a936347438d06dcdf3faca83a00b02a8677 (cherry picked from commit e03bfc830141a53acbabde3992edc14595bcef9a)
This commit is contained in:
parent
3b9d61cfc0
commit
ec35d210ce
2 changed files with 17 additions and 0 deletions
|
@ -5146,6 +5146,20 @@ void PartPlateList::BedTextureInfo::TexturePart::update_buffer()
|
|||
}
|
||||
}
|
||||
|
||||
void PartPlateList::BedTextureInfo::TexturePart::reset()
|
||||
{
|
||||
if (texture)
|
||||
texture->reset();
|
||||
if (buffer)
|
||||
delete buffer;
|
||||
}
|
||||
|
||||
void PartPlateList::BedTextureInfo::reset()
|
||||
{
|
||||
for (size_t i = 0; i < parts.size(); i++)
|
||||
parts[i].reset();
|
||||
}
|
||||
|
||||
void PartPlateList::init_bed_type_info()
|
||||
{
|
||||
BedTextureInfo::TexturePart pc_part1(10, 130, 10, 110, "bbl_bed_pc_left.svg");
|
||||
|
@ -5157,6 +5171,7 @@ void PartPlateList::init_bed_type_info()
|
|||
BedTextureInfo::TexturePart pte_part1(10, 80, 10, 160, "bbl_bed_pte_left.svg");
|
||||
BedTextureInfo::TexturePart pte_part2(74, -10, 148, 12, "bbl_bed_pte_bottom.svg");
|
||||
for (size_t i = 0; i < btCount; i++) {
|
||||
bed_texture_info[i].reset();
|
||||
bed_texture_info[i].parts.clear();
|
||||
}
|
||||
bed_texture_info[btPC].parts.push_back(pc_part1);
|
||||
|
|
|
@ -596,8 +596,10 @@ public:
|
|||
}
|
||||
|
||||
void update_buffer();
|
||||
void reset();
|
||||
};
|
||||
std::vector<TexturePart> parts;
|
||||
void reset();
|
||||
};
|
||||
|
||||
static const unsigned int MAX_PLATES_COUNT = MAX_PLATE_COUNT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue