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