ADDED "clear color" command to Appearance/Nets context menu.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14451
This commit is contained in:
Jeff Young 2023-06-19 10:31:46 +01:00
parent 55c00f1845
commit 252769d53e
1 changed files with 9 additions and 0 deletions

View File

@ -903,6 +903,11 @@ void APPEARANCE_CONTROLS::OnNetGridRightClick( wxGridEvent& event )
menu.Append( new wxMenuItem( &menu, ID_SET_NET_COLOR, _( "Set Net Color" ), wxEmptyString,
wxITEM_NORMAL ) );
menu.Append( new wxMenuItem( &menu, ID_CLEAR_NET_COLOR, _( "Clear Net Color" ), wxEmptyString,
wxITEM_NORMAL ) );
menu.AppendSeparator();
menu.Append( new wxMenuItem( &menu, ID_HIGHLIGHT_NET,
wxString::Format( _( "Highlight %s" ), netName ), wxEmptyString,
wxITEM_NORMAL ) );
@ -2956,6 +2961,10 @@ void APPEARANCE_CONTROLS::onNetContextMenu( wxCommandEvent& aEvent )
break;
}
case ID_CLEAR_NET_COLOR:
m_netsGrid->SetCellValue( row, NET_GRID_TABLE::COL_COLOR, wxS( "rgba(0,0,0,0)" ) );
break;
case ID_HIGHLIGHT_NET:
m_frame->GetToolManager()->RunAction( PCB_ACTIONS::highlightNet, true,
static_cast<intptr_t>( net.code ) );