We only need to iterate over the anchors when there are items that are
marked invalid. We check once in the item list and only if there are
invalid items to remove do we trim the anchor lists.
However, the connected items might still need to be trimmed, so we leave
this final step outside of the conditional.
This is a speed commit for large boards. Tracks and pads cannot connect
to elements that are not on the same layer. Rather than checking for
this at the last step, this commit splits the anchor vectors by layer,
limiting the initial search space.
Previously, binary search was hand-coded. This moves the search to a
std::algorithm variant. Also searches bbox by limits rather than
directly iterating.
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.
Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists. Changes to hotkeys save
only in the combined format.
Hotkey editor for each application only shows the hotkeys relevant to
that application.
Fixes: lp:1741757
* https://bugs.launchpad.net/kicad/+bug/1741757
Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
Select net has two columns, so we should limit the column width to the
size of the grid. The size should adjust with the window, so we take
the size of the first column as fixed and assign the rest of the grid
width to the second column.
It looks like D_GLIBCXX_ASSERTIONS=ON activated on some Linux versions creates too zealous tests at run time.
This patch just calculate the same pointer value using a slightly different formula.
Fix also a hard-to-understand comment
Fixes: lp:1770414
https://bugs.launchpad.net/kicad/+bug/1770414
m_Zone is a fully deprecated list of SEG_ZONE items (similar to TRACK), used to fill copper zones in *very old* boards.
it is even unlikely there are still boards that use them.
So it should be removed one day.
* Refresh the view only when changes are made in the caller frame.
* Allows recreate a new instances when try to open the 3D view from a frame taht is not the initial caller
* Remove duplicate code in kicad frames.
Add padding to standard dialog button sizer. On windows, the buttons are
slammed against the bottom of the dialog with no border which looks awful.
Fix alignment and padding in grid sizers.
Add padding to standard dialog button sizer. On windows, the buttons are
slammed against the bottom of the dialog with no border which looks awful.
Replace degree symbol with the word degrees. On windows, this does not
translate to the degree symbol.
While "fixes" isn't quite the right word, we do want this commit
associated with the following bug, and "fixes" is the easiest
way to do that:
Fixes: lp:1712579
* https://bugs.launchpad.net/kicad/+bug/1712579
Previously, dragging changes were applied only if the last cursor move
finished with a successful drag operation. It made items squeezing
difficult, as it required accurate cursor movement to apply the changes.
When counting items, many cases exist where we want to count all items
without checking flags. This short-circuits the loop to provide the
immediate count.
This allows the user to selectively disable the snap-to behavior when
placing stand-alone vias. Full solution will require an update to the
segment distance calculation that takes into account the rounded line
caps.
Fixes: lp:1769523
* https://bugs.launchpad.net/kicad/+bug/1769523
When saving a library, check and report on libraries that do not exist
as well as those that exist but are read-only.
Fixes: lp:1769190
* https://bugs.launchpad.net/kicad/+bug/1769190
Changes SHAPE_CONVEX to SHAPE_SIMPLE to better reflect the limitations.
Changes SHAPE_LINE_CHAIN::PointInside calculation to allow points
strictly inside a line chain
Fixes: lp:1768862
* https://bugs.launchpad.net/kicad/+bug/1768862
Usually pads do not overlap. However custom pads are represented as
their convex hull, so they may enclose other pads. This change allows the
router to select the closest pad to the cursor position.
The roundrect_rratio token was missing a leading space which made the
file formatting different from all other formatting when using rounded
rectangle pads.
Fixes lp:1768355
https://bugs.launchpad.net/kicad/+bug/1768355
This is particularly important when bulk adding (by director, etc.)
as otherwise the user might end up having to click OK to many
many error dialogs.
Fixes: lp:1764057
* https://bugs.launchpad.net/kicad/+bug/1764057
Also fixes a bug where a FOOTPRINT_EDIT_FRAME was being passed
in to a PCB_EDIT_FRAME.
Also tidies up Modedit settings handling for settings which can't
be edited in Modedit's preferences dialog. They're now copied
from Pcbnew.
Fixes: lp:1768477
* https://bugs.launchpad.net/kicad/+bug/1768477
This partially reverts 36d36de and 3bac100, moving the legacy footprint
lock/unlock code from the autorouter (which remains disabled) to
pcb_edit_frame.
Old code failed to set the wxEventType during acceptance, and
failed to set the default button during initialization.
Fixes: lp:1768253
* https://bugs.launchpad.net/kicad/+bug/1768253
When reading netlist or updating board from schematic, if the
changes leave a zone with a net with no pads then change the
zone's net to the new net of one of it's connections.
Also improves update-board-from-schematic's dry run reporting
to include zone nets and single-pad nets.
Fixes: lp:1609401
* https://bugs.launchpad.net/kicad/+bug/1609401
Duplicate already works, so there's little reason to disallow
using the zone dialog to do it.
The legacy canvas can't be fixed because we'll immediately
union the two zones, resulting in a no-op.
Fixes: lp:1464677
* https://bugs.launchpad.net/kicad/+bug/1464677
Corrects an error in polyline estimation
Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.
Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.
Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
For some obscure (for me) reason, the path separators in bundlepath are seen as escape seq, and the path can be incorrectly handled
(when \n or \r are found in this string).
it happens only for this path, not for other paths in LoadPlugins.
For bundlepath parameter, unix separator is now used.
Fixes: lp:1766879
https://bugs.launchpad.net/kicad/+bug/1766879
it was due to a incorrect behavior of TRACK::GetBestInsertPoint( BOARD* aPcb )
Also: update comment for this method.
Fixes: lp:1767061
https://bugs.launchpad.net/kicad/+bug/1767061
This really needs to get put into the VIEW_CONTROLS for all the
tools, but that's probably a bit too risky for 5.0 at this
point.
Fixes: lp:1766547
* https://bugs.launchpad.net/kicad/+bug/1766547
Previous algorithm used a static variable which it decremented
for each new unconnected track, but this resulted in the router
marking earlier fixed segments as collisions (because they
would get set to netcode = 0 when "fixed").
Fixes: lp:1762043
* https://bugs.launchpad.net/kicad/+bug/1762043
This had been removed along with autorouter but its functionality is
still desired. If/when the autorouter is resurrected, these IDs will
need to be deconflicted.
Fixes: lp:1766550
* https://bugs.launchpad.net/kicad/+bug/1766550
Corrected polygon export missing vertex.
Set pads to export on copper layer when not masked, keeping visual
output similar to physical.
Fixes: lp:1766634
* https://bugs.launchpad.net/kicad/+bug/1766634
If the initial pad was a custom pad converted in a usual pad + graphic items by the command:
"Explode Pad to Graphic Shapes"
the "old" primitives were not cleaned, and the new created pad contained these old primitives, regardless the new selected shapes.
(Usual case when a user want to edit a custom shape)
Also removes parallel implementation in favour of using the
normal one (with a new wxGauge-backed PROGRESS_REPORTER).
Fixes: lp:1764196
* https://bugs.launchpad.net/kicad/+bug/1764196
The hotkey fix committed in 53b1ec81 broke non-us keyboards. Change the
hotkey help hotkey from '?' to Ctrl+F1 to prevent the hotkey list dialog
from being shown when placing a bus wire junction in Eeschema and when
changing the track posture in Pcbnew. This is still broken in the GAL
framework.
When updating toolbars make sure the events are coming from the
toolbar in question (and not the menus which share the same ID).
Fixes: lp:1763563
* https://bugs.launchpad.net/kicad/+bug/1763563
Symbol/footprint library and entry have the same set of forbidden
characters with a single exception, space character. To accommodate for
this difference, LIB_ID validation and fix methods have been extended to
specify the LIB_ID type that is checked (schematic/board).
LIB_ID::HasIllegalChars() and LIB_ID::FixIllegalChars() had two different
sets of characters treated as invalid in LIB_IDs. The set has been
factored out to another function to avoid duplication.
Some changes (enable/disable a layer) set the dirty bit even for empty boards.
So when closing pcbnew, the dialog asking for saving the board was shown, even when no board loaded.
If the track being routed is unconnected, or the end-point
clicked on is unconnected, allow the connection by changing
the unconnected item to the net of the connected one.
Fixes: lp:1548129
* https://bugs.launchpad.net/kicad/+bug/1548129
When multiple cut commands were issued, the cut command handler would
restart multiple times and keep running until the handler that was
invoked first finishes. As all handlers kept a selection copy, they
would try to save the deleted items to the clipboard resulting in a
crash.
Fixes: lp:1761221
* https://bugs.launchpad.net/kicad/+bug/1761221
Also update the rest of the symbol-chooser usage to current
specs, including examining the timestamp to see if the list
needs loading at all.
Partial fix to: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
When a new footprint is created, CreateNewModule() added it to a dummy
board in the footprint editor. If a footprint was indeed created (the
action has not been aborted) then the dummy board was cleared,
destroying the just created footprint. Also, the new footprint is later
added with AddModuleToBoard() call.
Fixes: lp:1761052
* https://bugs.launchpad.net/kicad/+bug/1761052
Previous implementation refilled zones every time they have been
unselected. This patch adds a flag that tracks whether the
zone has been actually modified, so it will be refilled only when
necessary.
Fixes: lp:1760903
* https://bugs.launchpad.net/kicad/+bug/1760903
If a polygon has fewer than 3 points, it is invalid. We need to
register this as failure, otherwise we save the formatting/closing
s-expr for the polygon without the actual polygon points. This breaks
the footprint and board.
Don't re-save all files in a library when editing a single footprint.
This creates issues with formatting in version control systems where
unmodified files are re-written without being explicitly changed by the
user.
Fixes: lp:1752991
* https://bugs.launchpad.net/kicad/+bug/1752991
While we already cache the loaded footprint files, parsing said files
into the list is also time-intensive. Since the FOOTPRINT_LIST is
already hash-stamped against the current timestamps of the files that
make up the list, sharing a single copy of the list is quite
straight-forward.
The zeroth index is reserved especially for the <no net> tag, so we need
to keep the current net at 1 or greater to keep it connected.
Fixes: lp:1758488
* https://bugs.launchpad.net/kicad/+bug/1758488
We do not modify the underlying board when saving. Previously only the
visible layers were saved. This created a discrepancy between the board
that the user was editing and the board that was saved to disk.
Fixes: lp:1754049
* https://bugs.launchpad.net/kicad/+bug/1754049
- vias were always left selected, include vias in tracks filter - as in legacy
- make text filtering work
- cleanup drawings filtering code
- hide checkbox "Include items on invisible layers" because it does not work in GAL
If objects are at the clearance limit, they qualify as passing DRC.
Therefore, all comparison functions that indicate failure should be
strictly greater than or less than while all comparison functions that
indicate success (in the DRC) should be greater/equal or less/equal.
This also corrects a rounding error at the nm scale and handles
scaling zero-length and large segments correctly.
Fixes: lp:1756403
* https://bugs.launchpad.net/kicad/+bug/1756403
Fixes: lp:1593373
* https://bugs.launchpad.net/kicad/+bug/1593373