mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
WIP Fix an error in which the current selected material was not
correctly selected when there is more than one brand (stupid mistake). Also fix problems when the user changes some material information. Contributes to CURA-5682.
This commit is contained in:
parent
6dc53cc60a
commit
972f0bef43
3 changed files with 53 additions and 25 deletions
|
|
@ -13,16 +13,17 @@ Item
|
|||
{
|
||||
id: detailsPanel
|
||||
|
||||
property var currentItem: base.currentItem
|
||||
property var currentItem: null
|
||||
|
||||
onCurrentItemChanged: updateMaterialPropertiesObject()
|
||||
onCurrentItemChanged:
|
||||
{
|
||||
// When the current item changes, the detail view needs to be updated
|
||||
updateMaterialPropertiesObject()
|
||||
materialDetailsView.currentMaterialNode = currentItem.container_node
|
||||
}
|
||||
|
||||
function updateMaterialPropertiesObject()
|
||||
{
|
||||
if (currentItem === null)
|
||||
{
|
||||
return
|
||||
}
|
||||
materialProperties.name = currentItem.name || "Unknown"
|
||||
materialProperties.guid = currentItem.GUID
|
||||
materialProperties.container_id = currentItem.id
|
||||
|
|
@ -71,8 +72,6 @@ Item
|
|||
properties: materialProperties
|
||||
containerId: currentItem != null ? currentItem.id : ""
|
||||
currentMaterialNode: currentItem.container_node
|
||||
|
||||
|
||||
}
|
||||
|
||||
QtObject
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue