Commit Graph

109 Commits

Author SHA1 Message Date
Jeff Young 7e0ba42f0e Bug fixes for dragging labels attached to wires in orthogonal mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/12677
2022-11-25 15:05:15 +00:00
jean-pierre charras 78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Jeff Young d5a6452934 Get rid of special default line style for Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/11882
2022-06-27 19:12:45 -06:00
Miklós Márton 7ebdb4853c Do not open label edit dialog when adding label to an already named wire 2022-05-02 08:42:15 +00:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Mike Williams 567168fffc Schematic: make grabbing whole lines more intuitive
Selecting end and midpoint will select whole line. Some changes for
orthogonal dragging made this worse than in 6.0.

Improves, but does not fully resolve:
https://gitlab.com/kicad/code/kicad/-/issues/10860
2022-02-16 19:15:55 +00:00
Jeff Young f11b8011cd Separate plotting into background and foreground.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-10 20:33:06 +00:00
Mike Williams a5e8575091 Eeschema: Implement orthogonal dragging
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1956
2022-02-10 18:38:40 +00:00
Marek Roszko ac715d2e51 Scoop up some more wxPoint instances 2022-01-03 20:00:53 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 889970a449 SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
2021-12-24 16:13:27 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
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.
2021-12-23 20:36:07 +00:00
Jeff Young 75d750a3cb Copy lastResolved stuff when pasting.
This of course assumes the paste came from the same document.  If not
then pasted items will get default lastResolved stuff.
2021-11-28 17:09:24 +00:00
Jon Evans 08cb573e11 Do not propagate bus entries across buses and wires at the same point
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9678
2021-11-25 13:36:30 -05:00
Jeff Young 7fc04c3cf2 Fixes for realtime connectivity being off.
Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-24 13:20:44 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Wayne Stambaugh 925b6d9387 Eeschema header housekeeping round 2. 2021-03-25 17:55:16 -04:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +00:00
Jeff Young 999477e0ed Vastly simplify the needs-junction logic to try and make it less buggy.
Fixes https://gitlab.com/kicad/code/kicad/issues/7951
2021-03-18 16:38:48 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
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.
2021-03-11 08:37:35 -05:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
James Jackson 48853d0c88 Eeschema: Allow auto-wiring / drawing from unconnected bus and graphic line endpoints
Fixes https://gitlab.com/kicad/code/kicad/issues/7537
2021-02-19 17:15:27 +00:00
Jeff Young 2a7e60960a Use standard mirror icons & terminology.
Also use standard group icons.

Also put both (and rotate commands) in toolbar.

Fixes https://gitlab.com/kicad/code/kicad/issues/7504
2021-02-16 21:11:36 +00:00
Dominik Wernberger ac94d72d2d Add more const specifiers 2021-01-12 20:51:31 +00:00
Dominik Wernberger bb2881a5ab Make RENDER_SETTINGS argument const 2021-01-12 20:51:31 +00:00
Jeff Young 8bae52d1c3 Correct naming conventions. 2020-11-14 14:29:11 +00:00
Jeff Young 176f461b2c Fix a corner case of wire merging.
We want to look for a junction before merging two touching colinear
segments, but the old code would also check for a junction when
merging two overlapping segments, which is not what you want.

Fixes https://gitlab.com/kicad/code/kicad/issues/5960
2020-10-21 18:51:47 +01:00
Jeff Young 339fa5e0e3 Hack around the mess that we've made of line styles. :(
Fixes https://gitlab.com/kicad/code/kicad/issues/5960
2020-10-21 18:51:47 +01:00
Mark Roszko c940a45937 ADDED: Autostart wires in eeschema
Allows wires to be automatically started by clicking over a connection point
2020-10-01 23:53:47 +00:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Jon Evans 38a4e4ad5a Remove the last bits of the old netlist system 2020-08-30 16:30:04 -04:00
Jeff Young 741481591e NetClass settings for Eeschema.
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.

Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Tomasz Wlostowski c1d5394e46 properties: post-rebase fixes 2020-07-05 22:44:38 +02:00
Wayne Stambaugh 853cf2c9b9 Eeschema: make bus wire entry properties editable.
CHANGED: Bus to wire entry object properties line color, width, and style
can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4591
2020-06-24 13:36:17 -04:00
Wayne Stambaugh b15ee1086f Eeschema: factor out line stroke property object.
The line stroke property object STROKE_PARAMS was factored out an used in
the schematic line object.  This will allow it to be used in other objects
that require line stroke properties so every object does not need to have
it's own definition for line stroke properties.
2020-06-24 13:36:17 -04:00
Wayne Stambaugh 91fd063585 Eeschema: allow editing of wire and bus properties.
CHANGED: Wire and bus lines properties (color, line width, and line type)
can be edited the same as graphical lines.
2020-05-29 14:33:27 +00:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +01:00
Wayne Stambaugh 7dc64f08b7 Eeschema: implement s-expression schematic file formatter.
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format.  Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
2020-03-16 09:05:16 -04:00
Jon Evans 8660b4c144 ADDED: New color theme editor and multi-theme support 2020-03-06 00:01:03 -05:00
Jon Evans ac875e26a8 Fix handling of SCH_PINs on multi-unit parts
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Seth Hillbrand 77c60d9655 Remove the last vestiges of dlist
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
2020-01-10 06:37:08 -08:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00