mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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
|
@ -197,9 +197,7 @@ Popup
|
|||
}
|
||||
|
||||
function recalculateOrientation() {
|
||||
// Flip direction if there is not enough screen space
|
||||
var availableSpace
|
||||
|
||||
var targetPosition = target.mapToItem(monitorFrame, 0, 0)
|
||||
|
||||
// Stupid pop-up logic causes the pop-up to resize, so let's compute what it SHOULD be
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ Item
|
|||
ExpandableCard
|
||||
{
|
||||
enabled: printJob != null
|
||||
borderColor: printJob.configurationChanges.length !== 0 ? "#f5a623" : "#CCCCCC" // TODO: Theme!
|
||||
borderColor: printJob && printJob.configurationChanges.length !== 0 ? "#f5a623" : "#CCCCCC" // TODO: Theme!
|
||||
headerItem: Row
|
||||
{
|
||||
height: 48 * screenScaleFactor // TODO: Theme!
|
||||
|
@ -177,8 +177,7 @@ Item
|
|||
id: printerConfiguration
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
buildplate: "Glass"
|
||||
configurations:
|
||||
[
|
||||
configurations: !base.printJob ? [null, null] : [
|
||||
base.printJob.configuration.extruderConfigurations[0],
|
||||
base.printJob.configuration.extruderConfigurations[1]
|
||||
]
|
||||
|
@ -241,7 +240,7 @@ Item
|
|||
MonitorContextMenu
|
||||
{
|
||||
id: contextMenu
|
||||
printJob: printer ? printer.activePrintJob : null
|
||||
printJob: base.printJob ? base.printJob : null
|
||||
target: contextMenuButton
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue