Merge branch '4.0' into STAR-322_cloud-connection

This commit is contained in:
ChrisTerBeke 2019-01-14 14:16:35 +01:00
commit f2922e2405
7 changed files with 68 additions and 7 deletions

View File

@ -54,7 +54,7 @@ class ConfigurationModel(QObject):
for configuration in self._extruder_configurations: for configuration in self._extruder_configurations:
if configuration is None: if configuration is None:
return False return False
return self._printer_type is not None return self._printer_type != ""
def __str__(self): def __str__(self):
message_chunks = [] message_chunks = []

View File

@ -136,9 +136,9 @@ Cura.ExpandablePopup
onVisibleChanged: onVisibleChanged:
{ {
is_connected = Cura.MachineManager.activeMachineHasRemoteConnection && Cura.MachineManager.printerConnected //Re-evaluate. is_connected = Cura.MachineManager.activeMachineHasRemoteConnection && Cura.MachineManager.printerConnected && Cura.MachineManager.printerOutputDevices[0].uniqueConfigurations.length > 0 //Re-evaluate.
// If the printer is not connected, we switch always to the custom mode. If is connected instead, the auto mode // If the printer is not connected or does not have configurations, we switch always to the custom mode. If is connected instead, the auto mode
// or the previous state is selected // or the previous state is selected
configuration_method = is_connected ? (manual_selected_method == -1 ? ConfigurationMenu.ConfigurationMethod.Auto : manual_selected_method) : ConfigurationMenu.ConfigurationMethod.Custom configuration_method = is_connected ? (manual_selected_method == -1 ? ConfigurationMenu.ConfigurationMethod.Auto : manual_selected_method) : ConfigurationMenu.ConfigurationMethod.Custom
} }

View File

@ -12,10 +12,18 @@ Instantiator
model: Cura.GlobalStacksModel {} model: Cura.GlobalStacksModel {}
MenuItem MenuItem
{ {
text: model.metadata["connect_group_name"] property string connectGroupName:
{
if("connect_group_name" in model.metadata)
{
return model.metadata["connect_group_name"]
}
return ""
}
text: connectGroupName
checkable: true checkable: true
visible: model.hasRemoteConnection visible: model.hasRemoteConnection
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"] checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName
exclusiveGroup: group exclusiveGroup: group
onTriggered: Cura.MachineManager.setActiveMachine(model.id) onTriggered: Cura.MachineManager.setActiveMachine(model.id)
} }

View File

@ -77,7 +77,12 @@ Item
target: UM.Preferences target: UM.Preferences
onPreferenceChanged: onPreferenceChanged:
{ {
customPrintSetup.height = UM.Preferences.getValue("view/settings_list_height"); customPrintSetup.height =
Math.min
(
UM.Preferences.getValue("view/settings_list_height"),
base.height - (customPrintSetup.mapToItem(null, 0, 0).y + buttonRow.height + UM.Theme.getSize("default_margin").height)
);
} }
} }
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom

View File

@ -68,6 +68,11 @@ Item
// TODO Create a reusable component with these properties to not define them separately for each component // TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth labelColumnWidth: parent.firstColumnWidth
} }
RecommendedTroubleshootingGuides
{
width: parent.width
}
} }
UM.SettingPropertyProvider UM.SettingPropertyProvider

View File

@ -0,0 +1,36 @@
// Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM
import Cura 1.0 as Cura
Item
{
id: tipsCell
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
anchors.topMargin: Math.round(UM.Theme.getSize("sidebar_margin").height * 2)
anchors.left: parent.left
width: parent.width
height: tipsText.contentHeight * tipsText.lineCount
Label
{
id: tipsText
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
anchors.top: parent.top
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Need help improving your prints?<br>Read the <a href='%1'>Ultimaker Troubleshooting Guides</a>").arg("https://ultimaker.com/en/troubleshooting")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
linkColor: UM.Theme.getColor("text_link")
onLinkActivated: Qt.openUrlExternally(link)
}
}

View File

@ -26,7 +26,14 @@ Cura.ExpandablePopup
headerItem: Cura.IconWithText headerItem: Cura.IconWithText
{ {
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName text:
{
if (isNetworkPrinter && Cura.MachineManager.activeMachineNetworkGroupName != "")
{
return Cura.MachineManager.activeMachineNetworkGroupName
}
return Cura.MachineManager.activeMachineName
}
source: source:
{ {
if (isGroup) if (isGroup)