From 67e68e9e4f08923cb10efa7edcb2a9d575d320ed Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 13 May 2019 23:56:49 +0200 Subject: [PATCH] WIP: fixed net colorizer --- src/laybasic/laybasic/layNetlistBrowserModel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/laybasic/laybasic/layNetlistBrowserModel.cc b/src/laybasic/laybasic/layNetlistBrowserModel.cc index c34b08951..03a4ac9cc 100644 --- a/src/laybasic/laybasic/layNetlistBrowserModel.cc +++ b/src/laybasic/laybasic/layNetlistBrowserModel.cc @@ -137,12 +137,14 @@ NetColorizer::color_of_net (const db::Net *net) const size_t i = 0; for (db::Circuit::const_net_iterator n = circuit->begin_nets (); n != circuit->end_nets (); ++n, ++i) { + m_net_index_by_object.insert (std::make_pair (n.operator-> (), i)); if (n.operator-> () == net) { - m_net_index_by_object.insert (std::make_pair (n.operator-> (), i)); index = i; } } + } else { + index = cc->second; } return m_auto_colors.color_by_index ((unsigned int) index);