The reality is the DXF file can still override the selected unit option which is totally fine.
In fact, per specification, there is a way to change units mid-file with block records :/
There is no guarantee DXF contains $INSUNIT to specify the units of the file as its optional.
This allows the user to specify the expected units via dropdown.
SolidWorks can definitely generate such unit lacking files as an example
ADDED: Allow DXF/SVG graphics to be imported as a group
Also, cleanup the placement routine to allow the edit tool's flip
and rotate routines to be used when placing the items.
This standardizes the import vector graphics file dialog to use the
sbSizer titles instead of bold+lines. Tooltip changes will be in the
next change as we don't change strings for bugfix releases and this
commit is targeted for 5.1.3
Fixes: lp:1823462
* https://bugs.launchpad.net/kicad/+bug/1823462
Improve padding, spacing and alignment of dialog layout.
Fix title capitalization.
Make file dialog wildcard string translatable.
Remove fixed initial dialog size to allow sizers to work their magic.
Replace OK button event handler with TransferDataFromWindow.
Remember last line width units between dialog instances and sessions.
Save configuration file settings in a separate group and remove GfxImport
prefix from the entry names.
Add fencing to dialog header file to prevent nested includes.
Fixes lp:1822568
https://bugs.launchpad.net/kicad/+bug/1822568
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.