fix: use state role directly for binding updates
model.state doesn't trigger binding re-evaluation in Qt5 delegates. Using the implicit role 'state' directly does.
This commit is contained in:
parent
1d0fb99501
commit
3fd13c6d38
|
|
@ -991,8 +991,8 @@ ApplicationWindow {
|
|||
if (cc === "red") return "#f44336"
|
||||
return "#9e9e9e"
|
||||
}
|
||||
// Agent: use state from model (already updated via onAgentStateChanged)
|
||||
var s = model.state || "idle"
|
||||
// Agent: use state role from model
|
||||
var s = state || "idle"
|
||||
if (s === "idle") return "#4caf50"
|
||||
if (s.startsWith("calling")) return "#ff9800"
|
||||
return "#2196f3"
|
||||
|
|
|
|||
Reference in New Issue