Index: sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml =================================================================== diff -u -r1286d74bd015276aab604808be2766136091c125 -rf90366dd7a36ac03a4e387550811fe5b8a7fbe80 --- sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 1286d74bd015276aab604808be2766136091c125) +++ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision f90366dd7a36ac03a4e387550811fe5b8a7fbe80) @@ -30,17 +30,16 @@ header.visible : false headerTitle : qsTr("End Treatment") - onVisibleChanged: if (visible) { _root.updateModel() } + onVisibleChanged: if ( visible && instructionBased ) { _root.updateModel() } function updateModel () { - let group = stepNames[stackStepIndex] - if ( group === undefined ) group = "" - let instructionsGroup = vSettings.instructions[group] + let group = stepNames[stackStepIndex] ?? "" + let instructionsGroup = vSettings.instructions[group] - if ( instructionsGroup !== undefined ) { - instructionTitle = instructionsGroup.title - instructionStepNames = instructionsGroup.keys - instructionStepImages = instructionsGroup.values - } + if ( ! instructionsGroup ) { return } + + instructionTitle = instructionsGroup.title + instructionStepNames = instructionsGroup.keys + instructionStepImages = instructionsGroup.values } }