mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:35:58 +08:00
Prevent infinite recursion in material page if it could not be found
This commit is contained in:
parent
987ccd28ba
commit
cadc145008
@ -59,11 +59,14 @@ Item
|
|||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
{
|
{
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
materialDetailsPanel.currentItem = currentItem
|
if(materialDetailsPanel.currentItem != currentItem)
|
||||||
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
|
||||||
if (currentItem == null)
|
|
||||||
{
|
{
|
||||||
resetExpandedActiveMaterial()
|
materialDetailsPanel.currentItem = currentItem
|
||||||
|
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
||||||
|
if (currentItem == null)
|
||||||
|
{
|
||||||
|
resetExpandedActiveMaterial()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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