Erase net colors when they are reset by the user

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5342
This commit is contained in:
Jon Evans 2020-08-24 19:32:38 -04:00
parent f8609ed603
commit e9b8cac320
1 changed files with 4 additions and 1 deletions

View File

@ -264,7 +264,10 @@ void NET_GRID_TABLE::updateNetColor( const NET_GRID_ENTRY& aNet )
std::map<int, KIGFX::COLOR4D>& netColors = rs->GetNetColorMap();
netColors[aNet.code] = aNet.color;
if( aNet.color != COLOR4D::UNSPECIFIED )
netColors[aNet.code] = aNet.color;
else
netColors.erase( aNet.code );
m_frame->GetCanvas()->GetView()->UpdateAllLayersColor();
m_frame->GetCanvas()->RedrawRatsnest();