Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was changed (reloaded, cleared), pcbnew crashed because many pointers stored in dialog become invalid. Now the dialog is just closed.
* Add event handler to check all button clicks for default command event
IDs and handle them appropriately by either calling EndQuasiModal() or
passing the event up the event handler chain to allow the default dialog
handlers to perform their magic.
* Add event handler to handle the close window event properly.
* Add scope brackets so the wxBusyCursor will stop being displayed when
the footprint library loading is complete in CvPcb.
* Remove the artificial footprint library read error limit to prevent
potentially readable libraries from being loaded after the error limit
is reached.
* Change error message dialog to an HTML dialog so that potentially large
error messages can be displayed with scrolling and the ability to copy
and paste the error message for bug reporting purposes.
* Add busy cursor when loading the footprint libraries so the user has some
idea that something is happening while the footprint libraries are being
loaded.
* wxFileDialog ctor was setting the file name using the most recently used
path which was incorrect. Set the file path parameter to the most recently
used path and the file name parameter to an empty string.
* Remove last used import path and use the application wide most recently
path instead.
* Remove last used export path and use the application wide most recently
path instead.
* Prevent power component warning from being shown when edit normal component
fields.
* Make text edit dialog size itself instead of using a fixed size.
* Improve the alignment and spacing in the text edit dialog.
* Fix field name typo in field validator (thanks Jean-Pierre Charras for
catching this).
* Refactor edit one field dialogs to use validators and transfer data to and
from window functions.
* Add code to DIALOG_SHIM to handle validation and transfer functions since
the base dialog class code is not called by EndQuasiModal().
* Add custom validator class for filtering field text control characters.
* Add new field validator to edit schematic component dialog field text
control.
* Add new field validator to edit fields in library editor dialog field
text control.
* Make a few LIB_PART member functions const.
* Fix a minor issue in parseGraphic method to ensure correct parenthesis balance.
* Update a old (incorrect) .kicad_wks file in demo.
* page_layout_writer.cpp: remove a few useless spaces in output files.
The attached patch makes the following changes to the IDF
tool 'dxf2idf':
1. DXF units are now correctly scaled to mm
2. Polylines are now supported
3. LWPolylines are now supported
* Correctly implement scaling based on DXF $INSUNITS - at least where
INSUNITS is sensible. I ignore units like miles, gigameters, AU,
lightyear, parsec ...
* Correctly implements LWPolylines, adding an ARC segment rather than a
line segment when bulge != 0. A number of users have been complaining
about getting the wrong board shape (chamfered corners rather than
rounded corners) on DXF Import, now they shouldn't complain.
Following rev 6627 (git 2777182), if a non-duplicatable item was the object of
a Duplicate action, the original item would be picked up, potentially
misleading the user into thinking something was actually duplicated.
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:
1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).
2) The problem was when there was no editor, GetEditorName showed its own
dialog.
3) So the user was seeing first the dialog from (2) and then the dialog from
(1).
4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.
5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).
6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
* No initial copied object changed (this was a serious bug to modify these
objects. Previous version modified references and other texts using a
broken algorithm).
* Only new pads are numbered (therefore renumbering is used only in footprint
editor)
* Remove not working feature in circular array: now only use number for
pads (other options using alphabetical letters are removed: did not work
correctly).
* A more clear option is used to choose if the pads are numbered from a chosen
value or from the first available value.
* Adding a warning message if a parameter is incorrect.
* Linux environment variables are not initialized properly if the value
contains any non ASCII7 characters and if the locale is not set. Set
the locale before reading the environment variable configuration.
* Use temporary storage of new pins to prevent corruption of the library part draw items
list when adding alternater body style pins to existing component which caused segfault.
* Use case insensitive comparison to choose import plugin from the file extension. The
file extension is not always lower case especially on Windows.
* onleftclick.cpp: fix false warning message in the legacy canvas which happens afte
switching from the GAL canvas when a board item is still selected.
* The resource setting for bitmap2component is too late in the CMakeLists.txt,
and is being ignored. Bitmap2component does not have an icon resource on
Windows. Moving the entire section resolves the issue.
* The other programs only have the mingw special case listed, not the generic
declaration for the resource file so added them.