← Back to team overview

kicad-developers team mailing list archive

Re: Pcbnew delete hot key behavior.

 

On 2/29/2016 4:29 PM, Tomasz Wlostowski wrote:
> On 29.02.2016 20:41, Wayne Stambaugh wrote:
>> At some point in our history, someone half way changed the default
>> behavior of the delete hot key in pcbnew (legacy canvas).  There is a
>> dubious albeit incomplete attempt to limit the delete hot key to the
>> currently selected tool.  When did we decide to that and who made that
>> decision?  This would explain why I cannot delete certain items when
>> certain tools (track and footprint) are selected.  I thought we were
>> working under the assumption having to constantly select the "correct"
>> tool to delete (or any other hotkey function for that matter) items
>> associated with that tool was not a good thing but rather a waste of
>> time.  One of the things I've always hated about other EDA packages was
>> the notion that I could only delete object if I had the tool for that
>> object type selected.  I'm really not interested in repeating behavior
>> in KiCad.  Does anyone really think limiting hot keys to the currently
>> selected tool is a good idea?
> 
> Hi Wayne,
> 
> In my opinion, it's justified in some cases (such as being able to
> quickly delete a track).
> 
> I checked the behaviour of the legacy canvas:
> - when in track mode, it only allows deleting tracks
> - when in footprint mode, it only allows deleting footprints
> - when in zone mode, it doesn't delete anything.

The zone tool deletes zones, you just have to have the cursor close to a
zone edge.

> 
> The delete hotkey handler is called in all cases. I guess the problem
> PCB_EDIT_FRAME::OnHotkeyDeleteItem(), although it hasn't been modified
> since 2014.

I noticed this a long time ago but just didn't feel up to arguing about
it.  Looking at the code in OnHotkeyDeleteItem() to fix this bug:

https://bugs.launchpad.net/kicad/+bug/1538805

made me a bit grumpy so I'm feeling a bit more inspired to defend my
point of view.  I'm going to change the behavior of this so all of the
tools work the same way in the legacy canvas as long as an object is not
being drawn.  We also need to take a look at our lock code.  I'm not
sure why we don't have a common lock flag in EDA_ITEM as opposed to only
a lock flag for footprints.  It seems to me we should be able to lock
any object and use parent/child relationship to ensure any child objects
(only pads at the moment) remain locked when the parent is locked.

> 
> Tom
> 
> PS. I'm working on adding similar functionality to the GAL - it's a bit
> more complex, because the P&S has a separate data model that needs to be
> synced up to the underlying BOARD object when a delete operation is
> performed.

I understand that but when you are not actually drawing tracks, I don't
see the value in having to exit the track tool to edit any other object.
 If I have the track tool selected and realize that I need to rotate or
flip a component to improve the layout, I don't want to have to select
the footprint tool, rotate or flip the component, select the track tool,
and then begin routing again.  I just want to hit the M or R key and get
on with my routing.

> 
> 
>>
>> _______________________________________________
>> 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