mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 19:05:54 +08:00
Prevent infinite recursion in material page if it could not be found
This commit is contained in:
parent
987ccd28ba
commit
cadc145008
@ -59,6 +59,8 @@ Item
|
|||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
{
|
{
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
if(materialDetailsPanel.currentItem != currentItem)
|
||||||
|
{
|
||||||
materialDetailsPanel.currentItem = currentItem
|
materialDetailsPanel.currentItem = currentItem
|
||||||
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
||||||
if (currentItem == null)
|
if (currentItem == null)
|
||||||
@ -66,6 +68,7 @@ Item
|
|||||||
resetExpandedActiveMaterial()
|
resetExpandedActiveMaterial()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Main layout
|
// Main layout
|
||||||
Label
|
Label
|
||||||
|
@ -17,7 +17,7 @@ TabView
|
|||||||
property QtObject properties
|
property QtObject properties
|
||||||
property var currentMaterialNode: null
|
property var currentMaterialNode: null
|
||||||
|
|
||||||
property bool editingEnabled: false;
|
property bool editingEnabled: false
|
||||||
property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€"
|
property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€"
|
||||||
property real firstColumnWidth: (width * 0.50) | 0
|
property real firstColumnWidth: (width * 0.50) | 0
|
||||||
property real secondColumnWidth: (width * 0.40) | 0
|
property real secondColumnWidth: (width * 0.40) | 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user