Launching footprint editor from PcbNew changes default units to mm

Bug #1538239 reported by Art on 2016-01-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Low
Jeff Young

Bug Description

Seems to affect all canvases. Suppose your main units that you work with are inches and you have it selected in the preferences and you have one footprint which dimensions are specified in mm. Your normal work flow would be go to Preferences in PcbNew -> change to mm -> Launch Edit Footprint and then do actual editing. When you do that, the units jump back to whatever you had selected previously and you have to go back to PCBNew and change them again. For example - if you have inches selected, you change it to mm in preferences. You can see your units change to mm at the bottom of the screen. Now when you launch footprint editor the units change back to inches (both in PcbNew and footprint editor) and you have to change them second time around.

Just to mention something, it would be ideal if the units in footprint editor would be independent from the units of the PcbNew for the reason mentioned above.

Jeff Young (jeyjey) on 2018-01-26
Changed in kicad:
status: New → Confirmed
Jeff Young (jeyjey) wrote :

m_UserGridUnit is global. Opening modedit reads it from modedit's preferences file. If that's mm, then it will be updated for everything.

When modedit closes, pcbnew is already running, so it doesn't read its preferences again to update the global.

Hi Jeff,
I tested your patch on W7 32 bits, but unfortunately, it does not work very well:

There are still interactions between board editor and footprint editor when changing units.

Much more annoying, after opening/closing the footprint editor and changing units in each editor frame, I have a crash when closing Pcbnew.

Sorry.

It is definitely a hack — the real way to fix it would be to get rid of the global, but that’s too big for 5.0.

Maybe we should just wait for 6.0 and do it right?

Cheers,
Jeff.

> On 27 Jan 2018, at 19:16, jean-pierre charras <email address hidden> wrote:
>
> Hi Jeff,
> I tested your patch on W7 32 bits, but unfortunately, it does not work very well:
>
> There are still interactions between board editor and footprint editor
> when changing units.
>
> Much more annoying, after opening/closing the footprint editor and
> changing units in each editor frame, I have a crash when closing Pcbnew.
>
> Sorry.
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1538239
>
> Title:
> Launching footprint editor from PcbNew changes default units to mm
>
> Status in KiCad:
> Confirmed
>
> Bug description:
> Seems to affect all canvases. Suppose your main units that you work
> with are inches and you have it selected in the preferences and you
> have one footprint which dimensions are specified in mm. Your normal
> work flow would be go to Preferences in PcbNew -> change to mm ->
> Launch Edit Footprint and then do actual editing. When you do that,
> the units jump back to whatever you had selected previously and you
> have to go back to PCBNew and change them again. For example - if you
> have inches selected, you change it to mm in preferences. You can see
> your units change to mm at the bottom of the screen. Now when you
> launch footprint editor the units change back to inches (both in
> PcbNew and footprint editor) and you have to change them second time
> around.
>
> Just to mention something, it would be ideal if the units in footprint
> editor would be independent from the units of the PcbNew for the
> reason mentioned above.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1538239/+subscriptions

Jeff Young (jeyjey) wrote :

I can't reproduce JP's crash on OSX, which means it's going to be harder to fix.

I think we should withdraw this one from 5.0 and I'll remove the global for 6.0.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)

Yes, I share your opinion.
The only one good way is removing the global.

Yes, we should just wait for 6.0 and do it right.
(Or perhaps a 5.1, if any).

Jeff Young (jeyjey) on 2018-02-06
Changed in kicad:
status: Confirmed → In Progress
Jeff Young (jeyjey) on 2018-02-15
Changed in kicad:
milestone: none → 6.0.0-rc1
Jeff Young (jeyjey) on 2018-04-13
Changed in kicad:
importance: Undecided → Low
Jeff Young (jeyjey) on 2018-07-17
Changed in kicad:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers