← Back to team overview

kicad-developers team mailing list archive

Re: Question about track/via locking

 

The desired behavior is any object that is locked should be immutable
but there are a few places where KiCad falls short it this regard.  If I
lock an object, I expect all editing tools (including global delete) to
respect the lock until the lock is removed or I specifically say
included locked objects when making global deletions.

On 2/29/2016 11:38 AM, Tomasz Wlostowski wrote:
> Hi guys,
> 
> Does anybody here know if the 'locked' flag for tracks/vias affects
> anything else than the Global Deletions tool? It seems so from the code:
> 
> pcbnew(master)$ find . -name "*.cpp" | xargs grep TRACK_LOCK
> ./attribut.cpp: *  TRACK_LOCKED       protection against global delete
> ./attribut.cpp:    track->SetState( TRACK_LOCKED, Flag_On );
> ./attribut.cpp:        Track->SetState( TRACK_LOCKED, Flag_On );
> ./attribut.cpp:/* Modify the flag TRACK_LOCKED according to Flag_On value,
> ./attribut.cpp:        Track->SetState( TRACK_LOCKED, Flag_On );
> ./onrightclick.cpp:    if( Track->GetState( TRACK_LOCKED ) )
> ./class_track.cpp:    if( GetState( TRACK_LOCKED ) )
> ./class_track.cpp:    if( stateBits & TRACK_LOCKED )
> ./class_track.cpp:        ret << wxT( " | TRACK_LOCKED" );
> ./dialogs/dialog_global_deletion.cpp:            track_mask_filter |=
> TRACK_LOCKED;
> ./dialogs/dialog_global_deletion.cpp:                if( (
> track->GetState( TRACK_LOCKED | TRACK_AR ) & track_mask_filter ) != 0 )
> ./dialogs/dialog_global_deletion.cpp:                if( (
> track->GetState( TRACK_LOCKED | TRACK_AR ) == 0 ) &&
> 
> I'm asking because I'd like to add track/via locking feature to the GAL
> and I'm also considering making P&S avoid (hug) locked tracks/vias.
> 
> Cheers,
> Tom
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


References