← Back to team overview

kicad-developers team mailing list archive

Re: constness of HitTest(const wxPoint&)

 

On 05/02/2014 03:43 PM, Lorenzo Marcantonio wrote:
(...)
I think the design issue is that the zone has the selected part as an
internal state, but I reckon that would be very difficult to fix (I have
no better place to store it, at the moment, especially during edit): the
problem is that a zone is a composite object, so m_CurrentItem is not
enough to address it.
But, for example, MoveEdge could have the edge passed as an argument
instead of using object state (would you use a string class with only
embedded pointers and no positions in member calls?)

Hi Lorenzo,

With the new tool framework, the currently modified part of zone (be it corner or edge) is stored internally in the tool that does the modification (pcbnew/tools/point_editor.cpp in lp:~cern-kicad/kicad/drawing_tool). To be more precise - while editing, you modify location of EDIT_POINTs and when you stop dragging, zone corners are updated.

Regards,
Orson


Follow ups

References