Conflict resolvement boxes are now invisible if there is nothing to resolve

CURA-1263
This commit is contained in:
Jaime van Kessel 2016-12-02 13:37:56 +01:00
parent c50d0172cc
commit 3345e918e8

View file

@ -19,6 +19,7 @@ UM.Dialog
height: 350 * Screen.devicePixelRatio; height: 350 * Screen.devicePixelRatio;
minimumHeight: 350 * Screen.devicePixelRatio; minimumHeight: 350 * Screen.devicePixelRatio;
maximumHeight: 350 * Screen.devicePixelRatio; maximumHeight: 350 * Screen.devicePixelRatio;
property int comboboxHeight: 20
onClosing: manager.notifyClosed() onClosing: manager.notifyClosed()
onVisibleChanged: onVisibleChanged:
@ -101,7 +102,8 @@ UM.Dialog
{ {
id: machineResolveTooltip id: machineResolveTooltip
width: parent.width / 3 width: parent.width / 3
height: visible ? 25 : 0 height: visible ? comboboxHeight : 0
visible: manager.machineConflict
text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?") text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?")
ComboBox ComboBox
{ {
@ -109,7 +111,6 @@ UM.Dialog
textRole: "label" textRole: "label"
id: machineResolveComboBox id: machineResolveComboBox
width: parent.width width: parent.width
enabled: manager.machineConflict
onActivated: onActivated:
{ {
manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key) manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key)
@ -143,14 +144,14 @@ UM.Dialog
{ {
id: qualityChangesResolveTooltip id: qualityChangesResolveTooltip
width: parent.width / 3 width: parent.width / 3
height: visible ? 25 : 0 height: visible ? comboboxHeight : 0
visible: manager.qualityChangesConflict
text: catalog.i18nc("@info:tooltip", "How should the conflict in the profile be resolved?") text: catalog.i18nc("@info:tooltip", "How should the conflict in the profile be resolved?")
ComboBox ComboBox
{ {
model: resolveStrategiesModel model: resolveStrategiesModel
textRole: "label" textRole: "label"
id: qualityChangesResolveComboBox id: qualityChangesResolveComboBox
enabled: manager.qualityChangesConflict
width: parent.width width: parent.width
onActivated: onActivated:
{ {
@ -201,14 +202,14 @@ UM.Dialog
{ {
id: materialResolveTooltip id: materialResolveTooltip
width: parent.width / 3 width: parent.width / 3
height: visible ? 25 : 0 height: visible ? comboboxHeight : 0
visible: manager.materialConflict
text: catalog.i18nc("@info:tooltip", "How should the conflict in the profile be resolved?") text: catalog.i18nc("@info:tooltip", "How should the conflict in the profile be resolved?")
ComboBox ComboBox
{ {
model: resolveStrategiesModel model: resolveStrategiesModel
textRole: "label" textRole: "label"
id: materialResolveComboBox id: materialResolveComboBox
enabled: manager.materialConflict
width: parent.width width: parent.width
onActivated: onActivated:
{ {