mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 23:53:56 -06:00
Ensure that the material selection gets reset when diameter is changed
CURA-6590
This commit is contained in:
parent
758a8a0078
commit
2cd6b73d12
3 changed files with 10 additions and 1 deletions
|
@ -82,6 +82,7 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
editingEnabled: currentItem != null && !currentItem.is_read_only
|
editingEnabled: currentItem != null && !currentItem.is_read_only
|
||||||
|
onResetSelectedMaterial: base.resetExpandedActiveMaterial()
|
||||||
|
|
||||||
properties: materialProperties
|
properties: materialProperties
|
||||||
containerId: currentItem != null ? currentItem.id : ""
|
containerId: currentItem != null ? currentItem.id : ""
|
||||||
|
|
|
@ -41,8 +41,13 @@ Item
|
||||||
name: "cura"
|
name: "cura"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetExpandedActiveMaterial()
|
||||||
|
{
|
||||||
|
materialListView.expandActiveMaterial(active_root_material_id)
|
||||||
|
}
|
||||||
|
|
||||||
// When loaded, try to select the active material in the tree
|
// When loaded, try to select the active material in the tree
|
||||||
Component.onCompleted: materialListView.expandActiveMaterial(active_root_material_id)
|
Component.onCompleted: resetExpandedActiveMaterial()
|
||||||
|
|
||||||
// Every time the selected item has changed, notify to the details panel
|
// Every time the selected item has changed, notify to the details panel
|
||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
|
|
|
@ -29,6 +29,8 @@ TabView
|
||||||
property double spoolLength: calculateSpoolLength()
|
property double spoolLength: calculateSpoolLength()
|
||||||
property real costPerMeter: calculateCostPerMeter()
|
property real costPerMeter: calculateCostPerMeter()
|
||||||
|
|
||||||
|
signal resetSelectedMaterial()
|
||||||
|
|
||||||
property bool reevaluateLinkedMaterials: false
|
property bool reevaluateLinkedMaterials: false
|
||||||
property string linkedMaterialNames:
|
property string linkedMaterialNames:
|
||||||
{
|
{
|
||||||
|
@ -111,6 +113,7 @@ TabView
|
||||||
{
|
{
|
||||||
base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString());
|
base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString());
|
||||||
base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value);
|
base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value);
|
||||||
|
base.resetSelectedMaterial()
|
||||||
}
|
}
|
||||||
|
|
||||||
onNo:
|
onNo:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue