Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed. Closed will remove
the last segment if it lands on the first point. We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)
Fixes https://gitlab.com/kicad/code/kicad/issues/10334
(cherry picked from commit 55020c2b89)
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
Mesa does not support adaptive swapping but will sometimes report that
it does. This prevents Mesa drivers from testing (and segfaulting) the
limits of their call
Fixes https://gitlab.com/kicad/code/kicad/issues/10069
(cherry picked from commit 100cf757fe)
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support. This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)
Fixes https://gitlab.com/kicad/code/kicad/issues/8944
(cherry picked from commit 7c9340f855)
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
This only affected the tree controls that only parented sub-pages. Do
not use the dialog ctor to select the initial page. Queuing a page
changed event to fire after the dialog is shown is the proper solution.
Also includes going from distance-based neighbor exclusion to angle-
based. (Distance doesn't work when very short segments are followed
by very long ones.)
Fixes https://gitlab.com/kicad/code/kicad/issues/2512
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors
Fixes https://gitlab.com/kicad/code/kicad/issues/9963
Also regularizes some of the other selection filtering options.
This also fixes an invalidated iterator (and subsequent segfault) in
the old code.
Fixes https://gitlab.com/kicad/code/kicad/issues/9896
Improves rendering performance, esp. for large designs by:
- using a separate glDrawArrays calls() for large buffers of contiguous vertices (e.g. large zone fills)
- pooling smaller items into a small-sized index buffer held in system RAM (has to be DMAed to the GPU by the driver anyway)
CHANGED: Removed "ForcedCursorPosition()" and "IsCursorPositionForced()"
from view_controls.h. First, these functions are completely redundant
as they do the exact same thing but have different names. Second,
neither is called anywhere in the entire KiCad code base.
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them
Fixes https://gitlab.com/kicad/code/kicad/issues/9737
Processing a menu event for quitting results in the frame being
destroyed. This crashes the program when it tries to access the newly
freed frame to check for autosave data. We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
The overload of wxFilePath::FindValidPath() broke the normal behavior
when the file searched for existed in the current working directory.
This was causing the initial library table file to be copied from the
current working directory instead of from the list of search paths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9599
`wxLaunchDefaultApplication()` fails on files with spaces on Unix
systems due to a programmer error. This is fixed in newer wxWidgets
versions, so let's backport it as a workaround.
The old algorithm treated the "Words" checkbox as meaning match the
entire text, not match words, which is unlikely to be what anyone is
expecting.
Also fixes replace to replace all instances in a single text item
rather than just the first.
Reported on the forum.
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting. This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".
Fixes https://gitlab.com/kicad/code/kicad/issues/9506
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]
CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.
Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
Make auto save recover all auto saved sheet files not just the root sheet.
This does not fix existing auto save issues because recovery would require
an iterative reload for each automatically saved sheet file and would only
happen once.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9288
Rather than detaching and re-attaching the layer panels with the
attendant overhead, we keep each panel intact and only update its
contents. Since the bindings are the same, this saves substantial time
on pcb loading as well as when closing the board setup dialog
Unused variables in function calls can be commented out. Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
Also cleans up the dialog a bit.
Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9036
The default is usually wrong and presenting the basic footprint
information when creating an empty footprint allows the user to
establish their preference before mistakes occur.
Fixes https://gitlab.com/kicad/code/kicad/issues/9215
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.
Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).
Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.
Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.
See additional comments in the bug report.
Fixes https://gitlab.com/kicad/code/kicad/issues/9160
Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.
Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.
Fixes https://gitlab.com/kicad/code/kicad/issues/6026
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better. The
other platforms need a more limited range of sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
This is a test split per requests. While "Latin American Spanish" is
not really homogeneous, there are distinct differences to European
spanish, so we are splitting in an effort to allow both translations.
If one is less viable, this may re-merge in the future.
Moving points should not be overrided by disambiguation menu, so we
track where the disambiguation event started and only trigger the menu
if the mouse hasn't moved a full unit in x/y
Fixes https://gitlab.com/kicad/code/kicad/issues/9132
Previously, we were checking if the selection tool was the top of the
stack but this ignored many other "secondary" tools that might be
running such as the point editor. These still allow the selection tool
to handle events such as clicks. This change allows the selection tool
to handle clicks when it is the primary tool on the stack rather than
the top
Fixes https://gitlab.com/kicad/code/kicad/issues/9110
Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes#9101https://gitlab.com/kicad/code/kicad/issues/9101
This standardizes selection tools in SELECTION_TOOL class to be able to
handle a long-click as asking for a non-heuristic disambiguation menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/8490
This assigns the "Tab" key to a general pcbnew 45° limitation. Limit
can be enabled/disabled using context menu as well.
Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.
Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
This function attempted a poor-man's natural compare but it assumed
specific structure of the string. This broke for strings with
numberings that looked like decimals.
Instead, we use our natural string comparison function and remove the
references to this older function and its similar elements.
Fixes https://gitlab.com/kicad/code/kicad/issues/9067
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
Because the same parser is used to read all footprint files of a library,
the parser must be reinitialized (internal variable cleared) before reading
a new file, otherwise the previous parser state is applied to the next file.
Fixes#7627https://gitlab.com/kicad/code/kicad/issues/7627
For historical reasons they are stored in a string using spaces as separators.
So each fp filter is now escaped to remove spaces (replaced by {space})
Fixes#9009https://gitlab.com/kicad/code/kicad/issues/9009
NETCLASSes are stored as shared pointers. We lose the reference as soon
as the pointer count decrements to 0, which can happen immediately when
the shared pointer is returned.
The lemon parser doesn't lend itself to short-circuiting booleans,
but if we defer processing until we fetch the second value when
processing the TR_OP_BOOLEAN opcode then we get to piggy-back on
C++'s boolean short-circuiting.
1) Don't wait for UpdateUserInterface to build the (global) list of
layer names.
2) Report clearance resolution between a silk layer and a mask layer.
3) When writing DRC reports, include info about the violating rule.
4) Report "no relevant layers" if we fail to find anything to write
a clearance resolution report about.
Fixes https://gitlab.com/kicad/code/kicad/issues/8963