in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
The copper zones are checking for any point being outside the board
as they will have already been broken in to islands either entirely
outside or entirely inside the board. Not so for non-copper zones.
However, non-copper zones are *already* trimmed to the board edges,
so we just need to avoid using the above faulty assumption.
Fixes https://gitlab.com/kicad/code/kicad/issues/5811
When invoking "Break Track" from the RMB context menu, Pcbnew
gets and uses the current position of the mouse to figure out where to
break the track. The problem is that the mouse has to be moved to select
the "Break Track" menu item, and the mouse position used is wrong. This
can result in the break in the wrong location or not happening at all.
CHANGED: This commit determines if the "Break Track" was invoked from a
context menu or a hotkey. If a hotkey, it uses the current mosue position.
If a context menu, it uses the original postion of the mouse when the menu
was opened.
Fix compile error
Fix string format to use %ld instead to work on clang in CADSTAR Archive importers
Add virtual destructor to CONNECTION in CADSTAR_ARCHIVE_PARSER
CHANGED: When Pcbnew has the view flipped, it causes cross-probe zooming
to go the wrong direction. Instead of zooming in to the selected part,
it zooms very wide. The problem is the x dimension of the screen size
becomes a negative value when the view is flipped, so "fabs()" is used
to correct it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5157
plotter.h contains now only a header common to all plotters.
The code does not actually change, but it allows modifying a specific plotter
without recompiling most of kicad files.
We can't check for selected on parent groups because the order isn't
defined (and the parent may not yet have been selected). Check for
inclusion instead.
Before the selection filter, this heuristic made sense, but
now there is an explicit toggle to disable selection of locked
items, so we want to be able to select pads when that toggle
is enabled.
Also simplifies groups so that other areas of code that have to know
about them at least don't have to know as much. One of the simplifications
is to not worry so much about empty groups until save time; others are in
the access logic to parent groups.
Also simplifies user model slightly by removing Merge and Flatten
(which are just ungroup/group and ungroup/ungroup/.../group).
Also allows multiple groups to have the same name. This is useful when
using groups for a classification system.
Fixes https://gitlab.com/kicad/code/kicad/issues/5788
CHANGED: GetDocumentExtents() in 'eda_draw_frame.h' now has a bool
parameter "aIncludeAllVisible" with a default value "true" which makes
it behave as it did before adding parameter. If "aIncludeAllVisible"
is false, the returned bbox ignores some items depending on which
program it is running in.
CHANGED: Made "Zoom to Objects" use only PCB edge in Pcbnew. This
allows text, notes, etc outside the PCB edge to be excluded in the
zoom calculation.
CHANGED: Added "Zoom to Objects" to Pcbnew main menu, and to RMB context
menus for Eeschema and Pcbnew.
Fixes https://gitlab.com/kicad/code/kicad/issues/5787
The previous way of displaying a context menu was being
usurped by the selection tool because it was displaying its
menu before DispatchContextMenu was called, and all other tools
explictly use the TOOL_MENU system.
Fixes https://gitlab.com/kicad/code/kicad/issues/5762
This issue was also existing when copying to the clipboard.
Saving boards was not affected.
Instead of using canonical layer names, the user layers names were used.
Fixes#5779https://gitlab.com/kicad/code/kicad/issues/5779
ADDED memberOf() function for DRC rule expressions.
Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
This changes the file format. All previous copper layers that had a user
defined name are forced back to the canonical name and the user defined
name is stored as an optional quoted string in the layer definition and
only used for UI and plotting purposes. All copper object layer names
are now the canonical name for internal file use.
ADDED: Nine new user definable non-copper layers that can be optionally
added to the board layer stack.
CHANGED: All board layers can now be renamed by the user.
CHANGED: User defined layer names can now contain space characters.
Fixes https://gitlab.com/kicad/code/kicad/issues/1969
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2030
Note: this is a fairly basic API, you can't retrieve
individual DRC items. This is intended to be a hold-over
until we write the new Python API that can expose full
functionality (since we do not want to wrap the entire
DRC system with SWIG)
ADDED: Make middle mouse button double click do a 'Zoom to Fit'
in Eeschema, Pcbnew, and Gerbview. Ctrl-MMB does a 'Zoom to Objects'
in Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/1988
These objects can now be used in advanced DRC rules and
not just for keeping things out. Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
1) better load-balancing for deferred zones
2) sort zones by priority before filling
3) retire BOARD::GetZoneList() which had a horrible performance profile
4) implement a zone bounding box cache
5) better checks for IsCancelled() so long fills can be exited
Fixes https://gitlab.com/kicad/code/kicad/issues/5738
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
If the zone fill failed, then don't add the zone to the
exported VRML because it might not be correct.
Also test that the Python command in DIALOG_SCRIPTING worked.
This dialog actually isn't used anywhere currently, so it
could in theory be removed - but it is simple enough and
it provides a decent testing dialog that it is more work to remove
it.
These settings objects could be created in a constructor/destructor
so we should catch the exception since those are noexcept.
Also change the settings trace to match the other kicad traces
as KICAD_SETTINGS
The first attempt to address this which added back in the zones
with a 0 netcode didn't pick up those with a netcode which weren't
isolated (ie: because there were unplaced footprints outside the
board edges).
The new system gives up on trying to adjust the insulated island
list and just makes a second pass.
Fixes https://gitlab.com/kicad/code/kicad/issues/5658
Also improves the SNR and consistency of the menu item text. For
instance, a position is rarely useful, while relative sizes can be.
Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
DIMENSION is now an abstract class and we should cast to
concrete implementations instead.
Also change broken 'return none' to throwing an exception
which will give feedback about what is not supported by
the API instead of silently returning a non-object.
Also fixes a bunch of naming issues, primarily with lowercase for
protected variables, but also some for consistency with other parts
of the code.
Also changes the zone fill radio buttons in Board Setup to be more
generic referring to legacy vs. current, and to have tooltips.
Fixes https://gitlab.com/kicad/code/kicad/issues/5583
CHANGED: When moving a footprint, Pcbnew was always warping the mouse
to the origin of the moved object regardless of the state of the "Warp
mouse to origin of moved object" checkbox. This MR now honors the
state of the checkbox when moving footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/5279
Initialize Python scripting even if this directory cannot be created
It is not a mandatory dir, and not initializing python scripting can create crashes.
Fixes#5667https://gitlab.com/kicad/code/kicad/issues/5667
CHANGED: 'GetBoundingBox' has a variant that accepts a boolean that
determines if invisible text is included in the Bbox calculations. The
'IsVisible' function for the value and reference strings doesn't
factor in if the layer it's on is visible or even in the PCB stackup,
so 'GetBoundingBox' returns a bbox that factors in invisible text
regardless of what it's passed. This MR fixes that problem.
CHANGED: Refactored the original 'GetBoundingBox' function that doesn't
take a parameter. It now just calls the variant that does take a
parameter and passes it 'true'. The two versions had a lot of
duplicate code and this eliminates it.
Note: Issue 5629 might be better solved at the PCB module level, but this
does fix the known problems caused by it which were discovered in
'GetBoundingBox'.
Fixes https://gitlab.com/kicad/code/kicad/issues/5629
Right now we can't track the intended item to deselect
when there's an active selection already.
Having this feature available just from the appearance panel
should be fine.