mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-29 05:03:13 +08:00
FIX: paint the invalid remain as 100%
jira: [STUDIO-9967] Change-Id: Ie0b96d6a12e5d5b526e92360f7e93087134ed0a9
This commit is contained in:
parent
0c80f1a975
commit
716f22046d
@ -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…
x
Reference in New Issue
Block a user