Skip to content

Commit 284076c

Browse files
committed
added logic for black led when unloaded
1 parent 916316e commit 284076c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rqt_controller_manager/rqt_controller_manager/controller_manager.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def __init__(self, context):
9696
"finalized": QIcon(f"{path}/resource/led_off.png"),
9797
"inactive": QIcon(f"{path}/resource/led_cyan.png"),
9898
"unconfigured": QIcon(f"{path}/resource/led_yellow.png"),
99+
"unloaded": QIcon(f"{path}/resource/led_black.png"),
99100
}
100101

101102
# Controllers display
@@ -517,7 +518,8 @@ def data(self, index, role):
517518
return ctrl.state or "unloaded"
518519

519520
if role == Qt.DecorationRole and index.column() == 0:
520-
return self._icons.get(ctrl.state)
521+
state_key = ctrl.state if ctrl.state else "unloaded"
522+
return self._icons.get(state_key)
521523

522524
if role == Qt.FontRole and index.column() == 0:
523525
bf = QFont()

0 commit comments

Comments
 (0)