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.
Grid-based accuracy doesn't need to be any larger than 1/2 the
diagonal as we'll snap to one side or the other. And symbols don't
need as much slop as other items since there's plenty of "meat" on
them.
Fixes https://gitlab.com/kicad/code/kicad/issues/9805
1) Make sure the y-coord is correctly inverted before calling collision
routines.
2) Give LIB_SHAPE poly lines the same extra slop as SCH_LINEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/9791
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
Leaving the forced position on results in the auto-line linking to a pin
for far longer than we intend if there are other hits in the area of the
cursor
Fixes https://gitlab.com/kicad/code/kicad/issues/9321
If we do a real drag, the timer will be cancelled. If we don't, then
the user is still holding the mouse button down and would probably like
to see the menu. Otherwise it appears the action is dropped.
Keeps the lines connected but doesn't solve the crossed-wire mixups.
This allows common usage (mirroring labels/rotating segments) and leaves
prevention of the crossed wires to the user.
We can't really prevent crossed wires when rotating e.g. a part with
wires connected to 4 sides and users will not expect that. But we
should not disable useful features like mirroring multiple parallel
items to avoid a known impossible situation
Also provides an alternative solution to 345f506f0c that allows us to
rotate groups without destroying connections on hover
Fixes https://gitlab.com/kicad/code/kicad/issues/8403
Fixes https://gitlab.com/kicad/code/kicad/issues/8523
doSelectionMenu returns false to indicate a cancelled menu. This needs
to be handled in selectPoint when directly accessing doSelectionMenu in
the same manner as SelectionMenu() events
Fixes https://gitlab.com/kicad/code/kicad/issues/9218
The select-single-wire stuff is no longer needed, and the prefer-wire-ends
stuff needs to be distance-based.
Also improved wire hit-testing to include bubbles the size of the dangling
symbol at each end.
Fixes https://gitlab.com/kicad/code/kicad/issues/9187
1) Expand the accuracy to at least the grid spacing
2) Move pin-selects-symbol logic to Selectable()
3) Recode pick-closest algorithm to handle exactHits and inexactHits
separately
4) Remove pin target from bounding box in favour of expanding it to
at least as wide as the pin decoration (this prevents the accuracy
off the end of the pin from growing too large)
We have two cases where we might be requesting a disambiguation menu.
In one case, we already have the event loop waiting and we need to run
the selectionMenu through the action system. In the other case, the
tool isn't on the stack and won't activate. Here we need to run
directly and we are assured of not crashing because the tool isn't
active.
Fixes https://gitlab.com/kicad/code/kicad/issues/9154
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
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
SHIFT, CTRL, ALT modifier keys were handled in 2 different codes, one for
the selection tool and another to modify the mouse cursor shape, with 2
different configs.
Now the modifiers are managed from only one function.
Pcbnew: group also SHIFT, CTRL, ALT modifier keys management to a specific function.
Fixes#8021https://gitlab.com/kicad/code/kicad/issues/8021
We kept having various issues of the pointer list going stale. This
will prevent all permutations of that.
Also while I was in there I fixed the double-move thing (see bug
number).
Fixes https://gitlab.com/kicad/code/kicad/issues/7910
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
CHANGED: Ctrl-middle mouse button double click should perform
'Zoom to Objects' in Eeschema, but a change in modifier key handling
broke it. This MR restores the functionality.
Fixes https://gitlab.com/kicad/code/kicad/issues/7803
I think the guessSelectionCandidates narrows down to a single item
in 99.9% of cases, so we can probably remove this entirely. But for
now it's safer just to fix it.
Now looks at how hard it is to select the item (grids) and switches only
if the mouse is more than a grid square away and there is a new item
under the mouse.
Fixes https://gitlab.com/kicad/code/kicad/issues/4455
Forcing grid snap for the kick-start behavior loses snaps to pins that
may be desired. This also adds force-snapping in select mode to match
the user's auto-start preferences
Fixes https://gitlab.com/kicad/code/kicad/issues/7293
1) init reference pages before trying to draw the SCH_FIELDs when
turning intersheet references on
2) don't double redraw because we accidentally cleared the last
hover item on a non-mouse-moved event.
3) make sure the root sheet gets a name for the hypertext menu.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.
As an important side-effect this also fixes the undo issues with
intersheet refs.
The groundwork has now been laid for per sheet instance data. Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.
ADDED: Support for user defined schematic page numbers.
Also fixes a bug where the auto-start-wire stuff was messing up the seleciton
when the selection tool wasn't at the top of the tool stack.
Fixes https://gitlab.com/kicad/code/kicad/issues/5960
CHANGED: If you start the interactive delete tool and the mouse pointer
isn't near anything, Eeschema tries to use a null EDA_ITEM pointer
which throws an exception. This commit checks if the pointer is null
and exits if it is.
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
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor
This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.
Also, some IDs were converted to tools in the pagelayout editor.
CHANGED: All mandatory fields in derived symbols can be edited. This
not only includes the field value but also all text properties.
Kill the dual datasheet variable storage which caused many datasheet
bugs over the years. The datasheet is now always stored in the data
sheet field.
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of. Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
The parents are the only items that live in the RTree, so the rebuild
check needs to recurse into the sub structure to check for selection
Fixes https://gitlab.com/kicad/code/kicad/issues/3858
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.
Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
It served us (mostly) well for more than a decade. It helped KiCad grow
before the std:: came into decent shape or speed. It was a good little
list.
RIP DLIST 2008-2020
This moves EESchema DLIST structures to rtree. These changes are more
fundamental than the pcbnew changes from 9163ac543888c01d11d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
ADDED: a config option to select (when clicking on a pin) the parent symbol
or only the pin.
Previously, when cliking on a pin, the parent symbol was selected.
Allowing the pin selection is mandatory in cross probing, and to display the pin
characteristics in some cases, for instance if a pin is flagged by the ERC tooL.
Apparently the schematic and symbol library editors now have common
selection filtering so checking for a valid LIB_EDIT_FRAME when
filtering for the schematic editor frame prevented all schematic
object from being selected.
The symbol editor selection criteria did not include LIB_FIELD objects
which allowed the root symbol name to be changed causing broken derived
symbol links. Disable the symbols fields from being edited when a
derived part is shown in the editor to prevent this.
Add a missing warning that deleting a root symbol used to derive other
symbols would also delete all derived symbols from a library. Give the
user a chance to cancel the delete operation in this case.
Fixes kicad/code/kicad#3654
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support. Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added. The LIB_ALIAS information saved
in the document files was move into the LIB_PART object. This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.
REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.
NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
Right click is a pointing operation combined with a request for the
context menu. We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.
However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click. In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
Adding a field to a selection changes the bounding box and count for
rotation. This can cause odd offsets when the field is rotated against
the selection center rather than the bounding box as well as with the
component.
Fixes: lp:1849078
* https://bugs.launchpad.net/kicad/+bug/1849078
When we add enough SHEET_PINs that the vector has to grow, it
re-allocates the vector causing our for-loop to get its knickers
tied in a knot.
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394