예제 #1
0
void PNS_TOOL_BASE::highlightNet( bool aEnabled, int aNetcode )
{
    RENDER_SETTINGS* rs = getView()->GetPainter()->GetSettings();

    if( aNetcode >= 0 && aEnabled )
        rs->SetHighlight( true, aNetcode );
    else
        rs->SetHighlight( false );

    getView()->UpdateAllLayersColor();
}
예제 #2
0
void TOOL_BASE::highlightNet( bool aEnabled, int aNetcode )
{
    RENDER_SETTINGS* rs = getView()->GetPainter()->GetSettings();

    if( aNetcode >= 0 && aEnabled )
    {
        // If the user has previously set the current net to be highlighted,
        // we assume they want to keep it highlighted after routing
        m_startHighlight = ( rs->IsHighlightEnabled() && rs->GetHighlightNetCode() == aNetcode );

        rs->SetHighlight( true, aNetcode );
    }
    else
    {
        if( !m_startHighlight )
            rs->SetHighlight( false );

        m_startHighlight = false;
    }

    getView()->UpdateAllLayersColor();
}