Joinery tab: mark connected features in the list
Each feature row in the Joinery tab now shows "🔗 connected" when that feature
is part of a recorded connection (its id appears as an anchor or moving feature),
so it's clear which mortises/tenons are already mated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a1f6145115
commit
5e8a1c7926
|
|
@ -94,12 +94,15 @@ class FeaturePanel(QWidget):
|
|||
part = self._part()
|
||||
self.list.clear()
|
||||
feats = part.features if part else []
|
||||
connected = {c.anchor for c in self.c.scene.connections}
|
||||
connected |= {c.moving for c in self.c.scene.connections}
|
||||
# keep the active feature pointing at something on this board
|
||||
ids = [f.id for f in feats]
|
||||
if self.c.active_feature not in ids:
|
||||
self.c.active_feature = ids[0] if ids else None
|
||||
for f in feats:
|
||||
label = (f"{f.id}: {f.kind} · {f.face}")
|
||||
mark = " 🔗 connected" if f.id in connected else ""
|
||||
label = f"{f.id}: {f.kind} · {f.face}{mark}"
|
||||
item = QListWidgetItem(label)
|
||||
item.setData(Qt.UserRole, f.id)
|
||||
self.list.addItem(item)
|
||||
|
|
|
|||
Loading…
Reference in New Issue