← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] Add an option to select a reference point and an anchor in pcbnew move exactly dialog

 

On Tue, Feb 28, 2017 at 9:00 PM, Robbert Lagerweij
<rlagerweij@xxxxxxxxxxx> wrote:
> Hi Thomas,
>
> Thank you for your feedback. The duplication of code is indeed not how I
> would usually approach this but I thought it the lesser of two evils given
> the fact that the legacy stuff will most likely be deprecated immediately
> after the 5.0 release. This means that long term maintainability is not
> really affected since there will be limited chance of structural changes
> needed to that part of the code (presumably only 5.x bug fixes) .

Since the work is done already in Legacy, I'd vote to leave it in.
Duplicating code is paradoxically probably the cleanest way, as when
legacy gets the chop, the GAL code will be unaffected. Combining the
code is probably more likely to need tidying up in future that isn't
just deleting one of the call sites.

> If we go the GAL only route, since legacy and GAL use the same dialog, I
> could either create a new dialog which we only use in GAL or add additional
> logic to disable/hide the functionality in legacy.

I think a new dialog is overkill and not worth the effort since the
legacy work is done. At most, a constructor parameter to hide relevant
UI controls would suffice, and be easy to rip out later.

Cheers,

John


Follow ups

References