Index: sources/gui/qml/pages/treatment/TreatmentTrends.qml =================================================================== diff -u -rcdf3731b3aa395afa89430e81b1076087f3a2776 -r3f45841f8e2fa936666f8de8e2a02fe19fb39a8d --- sources/gui/qml/pages/treatment/TreatmentTrends.qml (.../TreatmentTrends.qml) (revision cdf3731b3aa395afa89430e81b1076087f3a2776) +++ sources/gui/qml/pages/treatment/TreatmentTrends.qml (.../TreatmentTrends.qml) (revision 3f45841f8e2fa936666f8de8e2a02fe19fb39a8d) @@ -28,9 +28,9 @@ */ ScreenItem { id: _root objectName: "_TreatmentTrends" + property alias isParamExpanded: _paramArea.isExpanded onVisibleChanged: { - _paramArea.isExpanded = false _paramList.positionViewAtBeginning() _historyList.positionViewAtBeginning() } @@ -264,7 +264,7 @@ Rectangle { id: _paramArea objectName : "_paramArea" - property bool isExpanded: false + property bool isExpanded: true anchors { top : parent.top bottom : parent.bottom @@ -365,6 +365,7 @@ ListView { id: _paramList objectName: "_paramList" readonly property int visibleParamCount: _paramArea.isExpanded ? 7 : 5 + readonly property int modelCount: model.count ?? 0 anchors { fill : parent @@ -454,6 +455,8 @@ } Behavior on contentX { NumberAnimation { duration: 200 } } + + onModelCountChanged: { positionViewAtBeginning() } } } @@ -620,6 +623,8 @@ ListView { id: _historyList objectName: "_historyList" + readonly property int modelCount: model.count ?? 0 + anchors { top : _timeArea.bottom topMargin : 10 @@ -681,6 +686,8 @@ text: entryID ? "(%1: %2) %3".arg(qsTr("ID")).arg(entryID).arg(message) : message } } + + onModelCountChanged: { positionViewAtBeginning() } } ScrollBar2 { id: _historyScrollbar