mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-05 22:37:41 -07:00
FIX: paint the invalid remain as 100%
jira: [STUDIO-9967] Change-Id: Ie0b96d6a12e5d5b526e92360f7e93087134ed0a9 (cherry picked from commit 716f22046db7de19ad298e6babed4398512bf7e7)
This commit is contained in:
parent
00c9ab01fb
commit
4fb8ab03fe
1 changed files with 5 additions and 2 deletions
|
|
@ -86,8 +86,11 @@ bool AMSinfo::parse_ams_info(MachineObject *obj, Ams *ams, bool remain_flag, boo
|
|||
if (!MachineObject::is_bbl_filament(it->second->tag_uid) || !remain_flag) {
|
||||
info.material_remain = 100;
|
||||
} else {
|
||||
info.material_remain = it->second->remain < 0 ? 0 : it->second->remain;
|
||||
info.material_remain = it->second->remain > 100 ? 100 : info.material_remain;
|
||||
if(it->second->remain < 0 || it->second->remain > 100) {
|
||||
info.material_remain = 100;/*ignore the invalid data*/
|
||||
} else {
|
||||
info.material_remain = it->second->remain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue