mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Handle null print job more elegantly
Contributes to CL-1150
This commit is contained in:
parent
255a7fa1fb
commit
d54a1cb41b
1 changed files with 12 additions and 9 deletions
|
@ -97,16 +97,19 @@ Item
|
|||
id: progressItem;
|
||||
color:
|
||||
{
|
||||
var state = printJob.state
|
||||
var inactiveStates = [
|
||||
"pausing",
|
||||
"paused",
|
||||
"resuming",
|
||||
"wait_cleanup"
|
||||
]
|
||||
if (inactiveStates.indexOf(state) > -1 && remainingTime > 0)
|
||||
if (printJob)
|
||||
{
|
||||
return UM.Theme.getColor("monitor_progress_fill_inactive")
|
||||
var state = printJob.state
|
||||
var inactiveStates = [
|
||||
"pausing",
|
||||
"paused",
|
||||
"resuming",
|
||||
"wait_cleanup"
|
||||
]
|
||||
if (inactiveStates.indexOf(state) > -1 && remainingTime > 0)
|
||||
{
|
||||
return UM.Theme.getColor("monitor_progress_fill_inactive")
|
||||
}
|
||||
}
|
||||
return "#0a0850" // TODO: Theme!
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue