wxWidgets sends the KillFocus event before the Cancel button event,
and it sets the receiving-focus window pointer to NULL (so you can't
even check for it being the Cancel button. Last time around (with
the UNIT_BINDER) I also tried a bunch of hacks for whether the window
pointer is NULL, etc., but they aren't discriminatory either.
Fixes: lp:1834975
* https://bugs.launchpad.net/kicad/+bug/1834975
Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
(cherry picked from commit 1c30f3d9a9)
More than that just gets annoying, and there is at least one edge case
which throws us into an infinite loop if we don't have something to
break us out.
Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
(cherry picked from commit 29db6152b3)
Prevent the symbol and footprint library table editors from substituting
the current project path (${KIPRJMOD}) when adding libraries to the global
library table. This will almost assuredly fail when opening a different
project. We still allow users to manually use ${KIPRJMOD} in global table
paths under the assumption that if they are typing this in then they most
likely understand environment variable substitution.
Fixes lp:1830694
https://bugs.launchpad.net/kicad/+bug/1830694
(cherry picked from commit 288982b15d)
Non-copper zones do not have a fillet/chamfer option, so we need to
clear it before the zone tool uses the last-used option.
Fixes: lp:1833672
* https://bugs.launchpad.net/kicad/+bug/1833672
The previous commit missed a case where the number was so large that it
overflowed the integer invalidating the comparison. This protects
against that case by using floating point comparison.
This checks the movement against a maximum value that would place the
selection outside of the valid area for the footprint or board.
Fixes: lp:1833478
* https://bugs.launchpad.net/kicad/+bug/1833478
DIALOG_EXIT was not being laid out correctly after setting the dialog
message. Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT. This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.
Remove DIALOG_EXIT_BASE as it is no longer required.
Fixes lp:1832899
https://bugs.launchpad.net/kicad/+bug/1832899
(cherry picked from commit 3f665318f4ab5c02b7d3c29b5233a273fdac2e4e)
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).
Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
Tab through the grid vertically, then horizontally, as the fields
are laid out with "related" fields (like the co-ords) vertically.
Also neaten headers.
Fixes: lp:1821887
* https://bugs.launchpad.net/kicad/+bug/1821887
(cherry picked from commit d6b8e9e037)
Disable the text update event for the orientation cutom value field before
updating it when the radio buttons are selected. This allows to use the
conventional EVT_TEXT handler, rather than KEYDOWN, which has two effects:
* Tabbing though the dialog no longer sets custom orientation
* Click-driven clipboard actions trigger the update correctly.
Introduce a helper function in validators.h to assist in updating
validated fields without triggering further events.
Fixes: lp:1819006
* https://bugs.launchpad.net/kicad/+bug/1819006
Set the focus to some control in the copper zone, non-copper zone, and
keep out zone dialogs required for the default button action to work
properly. This only seem to affect windows dialogs.
Fixes lp:1818397
https://bugs.launchpad.net/kicad/+bug/1818397
wxWidgets has several bugs that result in cell editors being closed
right after they're opened. There are two wxWidgets hacks to
partially address this: the SetInSetFocus() hack, and a slow-click
hack. We used to try and work-around these bugs ourselves for
single-click access, but this changelist moves those over to
wxWidget's slow-click hack.
Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
* fp editor: ensure axis are drawn after switching the backend
* DIALOG_PNS_SETTINGS: ensure violate DRC option is correctly enabled/disable when opening the dialog.
Violating the DRC cannot happen in shove or walk around mode as we use
the DRC to calculate these actions. The tooltip explains this as well
but we need to explicitly disable the checkbox to prevent users from
thinking that they can complete DRC violating tracks in other modes.
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:
* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative
Also set some initial focus fields in the same dialogs.
Tidy a few includes.
Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
Includes Edit Text and Graphics Properties and Edit Track and Via
Properties. It's also no longer board-specific as it turns out the
board timestamp is always 0 anyway.
The best size was calculated from a default size.
This default size (calculated by wxWidgets) was fully broken with some texts in a few languages.
So now this best size does not use this default size.
Fixes: lp:1816315
https://bugs.launchpad.net/kicad/+bug/1816315
Auto-selecting of the first grid element is performed in the footprint
editor to facility rapid editing. Rapid editing of the 3d-model fields
is not as useful and requires multiple esc-keys to cancel. This limits
the auto-edit to only the reference tab.
Fixes: lp:1815456
* https://bugs.launchpad.net/kicad/+bug/1815456
The parent window was always the board edit frame,
but this is incorrect when this dialog is called from the Plot dialog.
Fixes: lp:1815530
https://bugs.launchpad.net/kicad/+bug/1815530
Update 3D model panel on initial dialog load to reflect the current
visibility state of the 3D model.
Fix a few minor footprint properties dialog spacing issues.
Fixes lp:1815184
https://bugs.launchpad.net/kicad/+bug/1815184
Fix wxGrid column minimal widths on Windows in dialogs (just fixing the size is not enough).
WX_GRID::GetVisibleWidth(): make width bigger for labels, because they usually use a bold font.
(However, the fix is just a workaround: a better code is welcome)
Using the normal command, oval holes are "drilled" by a route command.
Some board houses do not accept this normal command.
In this case, the drill dialog allows using an other Excellon drill command (a slotted hole).
Note also some board houses do not understand this alternate command!
GTK does not handle enlarged text layouts automatically, so we need to
get the screen size before choosing the correct grid width for the
dialog
Fixes: lp:1788495
* https://bugs.launchpad.net/kicad/+bug/1788495
When doing a global edit of the tracks and vias, we need to allow for
the possibility that the track size doesn't change and that this is
explicitly allowed without DRC error.
The using the "first available" numbering option, force an
artifical linear numbering scheme starting at '1'.
Start the pad name provider at the 0'th pad index.
Also adds a few related tests and adjusts tests affected by
this change to reflect that the offset still applies.
This can be expanded in future to be more general by skipping
pad (which would allow a custom start and numbering scheme
while still avoiding duplication), but for now,
this does what the UI says and avoids string changes in 5.1rc.
Fixes: lp:1814918
* https://bugs.launchpad.net/kicad/+bug/1814918
Fixes: lp:1814917
* https://bugs.launchpad.net/kicad/+bug/1814917
* Make LIB_TABLE_BASE::GetCount() return unsigned. This is more
consistent with the behaviour of STL containers (especially the
boost::ptr_vector this is really accessing). Sadly
wxGridTableBase() forces an int, so a cast is still required
at the WX interface.
* Make LIB_TABLE_BASE::At() return a reference. First, this is more
consistent with normal STL indexing operator[]'s, and secondly, it
allows an idiomatic const index method (so you can access const
LIB_TABLE_ROWs from a const LIB_TABLE_BASE).
The motivation is to allow use of this class and LIB_TABLE_ROW
in a test program, where the LIB_TABLE_BASE is const.
In countries using a comma as floating point separator, the --min-distance="0.0100 mm" was passed as --min-distance="0,0100 mm"
This is incorrect and broke the command line.
Fixes: lp:1814559
https://bugs.launchpad.net/kicad/+bug/1814559
When creating new lib table rows, the pointer becomes managed by the new
table through the boost::ptr_vector. The row is non-copyable, however,
so we lose the reference as soon as it goes out of scope. Creating a
clone provides a new pointer that is moved into the table on creation.
Fixes: lp:1792456
* https://bugs.launchpad.net/kicad/+bug/1792456
It was a regression from 5.02 version.
The block of new footprints to place has now its reference point (the point that is on the graphic cursor) fixed.
This is the first footprint loaded from the list.
The CONFIG_SAVE_RESTORE_WINDOW class does not need to be tied
to the array dialog, put it in common/widgets.
Also do a refactor and tidy-up of the the class, use a union for (slightly)
better type-safety and syntax (a variant would be better but that's C++17).
Also enable integral field save/restore from text boxes.
Fully initialise the CREATE_ARRAY_DIALOG_ENTRIES object,
and use these values for the dialog on first open. Currently,
the initial values aren't all initialised, and none are used, as the
valid flag is not set. This means there are poor defaults in some
fields.
Also more declarations and defintions of CREATE_ARRAY_DIALOG_ENTRIES
to the .cpp, as these do not need to be exposed in the header,
even privately.
The numbering axis priority (h then v or v then h), and alternate
reversing are not actually numbering parameters, they are part of
the geometry of the array (the items are physically in different
orders).
So enable these options, even when numbering is disabled.
Also fix broken logic about when numbering scheme is enabled
(it still applies even if the numbering offset is fixed.)
The geometry and numbering logic is separate to the dialog, and
can be separated for clearer logic and better testability.
Moreover, refactor it to avoid any dependency on pcbnew
classes, so it can be move to common for potential re-use in
eeschema and friends in future.
Also convert all wxPoint logic in these classes to VECTOR2I and
fix some function visibilities.
Add some unit tests of the ARRAY_OPTIONS geometry and numbering.
Snapping to item options were partially disconnected when unifying
framework. This re-attaches the options and adds the additional option
for graphical items.
Fixes: lp:1801377
* https://bugs.launchpad.net/kicad/+bug/1801377
kicad2step has a tolerance level that sets whether two points are at the
same location or not. This allows KiCad to access these levels to some
degree, permitting a looser interpretation of a closed board outline.
- Added ignore netcode option to CONNECTIVITY_DATA::GetConnectedItems()
- PlaceModule() now ensures the module added to the board (and thus to the connectivity database) has correct bounding box necessary for R-trees to work
- Use recursive connected pad search so that the new net is propagated to all pads
Fixes: lp:1787961
* https://bugs.launchpad.net/kicad/+bug/1787961
If the user does not build the GITHUB plugin (deprecated), we cannot use
it in our footprint load and should remove the define to ensure
accidental use is caught at compile time.
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time. Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
wxChoice centers the selection on GTK. So when switching from a
mid-list item to an item at the top, the list is always cut off for
choice lists located on the top toolbar. Using a combobox provides a
drop-down that allows easier access to all elements in the box.
Fixes: lp:1808569
* https://bugs.launchpad.net/kicad/+bug/1808569