fix: Fixed bug that crashes matrix_text when encoders are present
parent
fdb61a6a11
commit
f0e577b2bc
|
|
@ -89,13 +89,14 @@ class MatrixTest(BasicEditor):
|
||||||
|
|
||||||
# write matrix state to keyboard widget
|
# write matrix state to keyboard widget
|
||||||
for w in self.keyboardWidget.widgets:
|
for w in self.keyboardWidget.widgets:
|
||||||
row = w.desc.row
|
if w.desc.row is not None and w.desc.col is not None:
|
||||||
col = w.desc.col
|
row = w.desc.row
|
||||||
|
col = w.desc.col
|
||||||
|
|
||||||
if row < len(matrix) and col < len(matrix[row]):
|
if row < len(matrix) and col < len(matrix[row]):
|
||||||
w.setPressed(matrix[row][col])
|
w.setPressed(matrix[row][col])
|
||||||
if matrix[row][col]:
|
if matrix[row][col]:
|
||||||
w.setActive(True)
|
w.setActive(True)
|
||||||
|
|
||||||
self.keyboardWidget.update_layout()
|
self.keyboardWidget.update_layout()
|
||||||
self.keyboardWidget.update()
|
self.keyboardWidget.update()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue