perf: gate sparkline repaints on panel visibility
This commit is contained in:
parent
59547f81f1
commit
25c2ed1021
1 changed files with 12 additions and 2 deletions
|
|
@ -202,8 +202,18 @@ M.BarSection {
|
|||
property var _hist: root._coreHistory[parent.parent.index] || []
|
||||
property color _col: parent.parent._barColor
|
||||
|
||||
on_HistChanged: requestPaint()
|
||||
on_ColChanged: requestPaint()
|
||||
on_HistChanged: if (root._showPanel)
|
||||
requestPaint()
|
||||
on_ColChanged: if (root._showPanel)
|
||||
requestPaint()
|
||||
|
||||
Connections {
|
||||
target: root
|
||||
function on_ShowPanelChanged() {
|
||||
if (root._showPanel)
|
||||
sparkline.requestPaint();
|
||||
}
|
||||
}
|
||||
|
||||
onPaint: {
|
||||
const ctx = getContext("2d");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue