← Back to team overview

kicad-developers team mailing list archive

I have trouble with wires in eeschema...

 

I have issues with patch 22 (the wire refactoring) and eeschema doesn't work quite right. I have troubles with wire creation... if I get it currently the BeginSegment look if it's the first click and need to begin a new wire or if it needs to proceed with the following segment.

The code is this:

    // We should know if a segment is currently in progress
    segment = (SCH_LINE*) GetScreen()->GetCurItem();
    if( segment )   // a current item exists, but not necessary a currently edited item
    {
        if( !segment->GetFlags() || ( segment->Type() != SCH_LINE_T ) )
        {
            if( segment->GetFlags() )
            {
                wxLogDebug( wxT( "BeginSegment: item->GetFlags()== %X" ),
                    segment->GetFlags() );
            }
            // no wire, bus or graphic line in progress
            segment = NULL;
        }
    }

If there's nothing, no issue.

If there's something and is a line:
    If has flags, OK
    If hasn't flags take it as null

If there's something and it not a line:
    If has flags show them and take it as null anyway

I don't get the meaning of this code...
The previous segment has the IS_NEW flag set (so it passes) but what's the debug statemnet for???

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups