From a11cc8791b0cc21d6b5c95596644f34e05c7d139 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 12 Oct 2019 10:35:52 +0200 Subject: [PATCH] set wire active flag --- ecp5/arch.cc | 2 +- ecp5/arch.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 947d0f93..81a9725c 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -822,7 +822,7 @@ DecalXY Arch::getWireDecal(WireId wire) const decalxy.decal.type = DecalId::TYPE_WIRE; decalxy.decal.location = wire.location; decalxy.decal.z = wire.index; - decalxy.decal.active = false; + decalxy.decal.active = getBoundWireNet(wire) != nullptr; return decalxy; } diff --git a/ecp5/arch.h b/ecp5/arch.h index 815dae0c..a0254965 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -660,6 +660,7 @@ struct Arch : BaseCtx wire_to_net[wire] = net; net->wires[wire].pip = PipId(); net->wires[wire].strength = strength; + refreshUiWire(wire); } void unbindWire(WireId wire) @@ -679,6 +680,7 @@ struct Arch : BaseCtx net_wires.erase(it); wire_to_net[wire] = nullptr; + refreshUiWire(wire); } bool checkWireAvail(WireId wire) const