mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Small clean-up of log warnings
Contributes to CL-1165
This commit is contained in:
parent
3377ed0e6e
commit
8d76bd8678
3 changed files with 12 additions and 16 deletions
|
@ -21,15 +21,8 @@ Item
|
|||
{
|
||||
id: popUp
|
||||
|
||||
// If the pop-up won't fit in the window, flip it
|
||||
direction:
|
||||
{
|
||||
var availableSpace = monitorFrame.height
|
||||
var targetPosition = target.mapToItem(null, 0, 0)
|
||||
var requiredSpace = targetPosition.y + target.height + contentWrapper.implicitHeight
|
||||
console.log("available space", availableSpace - targetPosition.y + target.height)
|
||||
return requiredSpace < availableSpace ? "top" : "bottom"
|
||||
}
|
||||
// Which way should the pop-up point? Default is up, but will flip when required
|
||||
direction: "up"
|
||||
|
||||
// Use dark grey for info blurbs and white for context menus
|
||||
color: "#ffffff" // TODO: Theme!
|
||||
|
@ -60,7 +53,7 @@ Item
|
|||
}
|
||||
text: catalog.i18nc("@label", "Move to top");
|
||||
visible: {
|
||||
if (printJob && printJob.state == "queued" && !assigned) {
|
||||
if (printJob && printJob.state == "queued" && !isAssigned(printJob)) {
|
||||
if (OutputDevice && OutputDevice.queuedPrintJobs[0]) {
|
||||
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
|
||||
}
|
||||
|
@ -180,4 +173,10 @@ Item
|
|||
function close() {
|
||||
popUp.close()
|
||||
}
|
||||
function isAssigned(job) {
|
||||
if (!job) {
|
||||
return false;
|
||||
}
|
||||
return job.assignedPrinter ? true : false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue