Commit Graph

271 Commits

Author SHA1 Message Date
Jeff Young c4336de868 Bug fixes in new dangling symbol drawing code. 2021-12-07 21:31:42 +00:00
Jeff Young 2e342ed8c9 Draw dangling symbols on a separate layer.
This allows us to draw them in front of wires, pins, and most
importantly, junction dots.

Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-06 18:50:50 +00:00
Wayne Stambaugh a03e6e4926 Revert "Eeschema: fix broken page numbers when renaming a sheet file name."
This reverts commit a468a79948.
2021-12-06 07:47:18 -05:00
Mikolaj Wielgus 10be483430 Make an exception for SCH_TEXT in SELECTION::GetCenter()
And undo the previous changes in SCH_TEXT::Rotate().

We continue hitting this with a wrench until it gets fixed or becomes
broken beyond any recognition.
2021-12-04 05:32:48 +01:00
Mikolaj Wielgus 83162364e7 Restore old rotation behavior for SCH_LABEL
Fixes https://gitlab.com/kicad/code/kicad/issues/9861
2021-12-03 01:43:02 +01:00
Mikolaj Wielgus 4ba110e1ec Restore original SCH_TEXT::GetBoundingBox()
Didn't intend to commit this, it was a mistake.
2021-12-02 16:43:19 +01:00
Mikolaj Wielgus bb08ef2f41 Fix SCH_TEXT rotation around a reference point
Fixes https://gitlab.com/kicad/code/kicad/issues/9690
2021-12-02 16:35:35 +01:00
kliment 9f568d3658 Eeschema: Add support for leading zeroes when auto-incrementing names (fixes #9831) 2021-12-01 13:20:35 +00:00
Wayne Stambaugh a468a79948 Eeschema: fix broken page numbers when renaming a sheet file name.
Remove duplicate instance data saved in both root SCH_SCREEN and SCH_SHEET
objects that was causing them to be out of sync.  All sheet instance data
is stored in the SCH_SHEET object itself and rebuilt on the fly so it is
always current.

Remove Get/SetPageNumber from SCH_SHEET_PATH object so it doesn't obfuscate
where the actual sheet page number information exists.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9782
2021-11-30 08:11:24 -05:00
Mikolaj Wielgus f35b0446e6 Properly initialize SCH_TEXT spin style 2021-11-27 19:42:11 +01: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
Jeff Young 016a98df86 Increment numbers which have suffixes too.
Fixes https://gitlab.com/kicad/code/kicad/issues/9706
2021-11-21 18:02:17 +00:00
Seth Hillbrand cd3ecdfc78 Fix sort to be irreflexive
Switching the order of the parameters must switch the sort order (no <=)
otherwise the sort is non-determinant and fails std::sort preconditions
2021-11-08 11:25:13 -08:00
Ian McInerney 5817a8b5f4 Remove unused m_host variable
This variable isn't needed anymore after 5f53019290
pushed dark mode handling into the HTML window itself.
2021-10-18 00:29:40 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Jeff Young 5d579d14c1 Give intersheet refs a bit more breathing room. 2021-10-01 18:29:21 +01:00
Jeff Young f73042fe24 Some minor performance enhancements. 2021-09-28 14:28:35 +01:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00
Jeff Young 2d72ccb6ae Simplify dangling end stuff a bit and remove graphic lines from it. 2021-09-24 12:19:27 +01:00
Jeff Young 5c07441e24 Remove Setup Dialog assignment of netclasses to buses.
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
2021-09-17 22:01:17 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

Fixes https://gitlab.com/kicad/code/kicad/issues/9157

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Seth Hillbrand 1c409ff90a Fix typo in previous commit 2021-09-13 20:23:52 -07:00
Seth Hillbrand 2fdd805eda Override SCH_GLOBALLABEL::HitTest
Global labels can optionally have intersheet references.  When enabled,
they expand the bounding box of the label.  Because they can be far away
from the actual label, the bounding box is not a good approximation for
the hittest
2021-09-13 19:55:48 -07:00
Jeff Young dfacac5eb6 Repair label incrementer to handle formatting constructs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8992
2021-08-19 00:08:37 +01:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
david-beinder c34f45f646 Split global label size expansion from TextOffset setting
Global label expansion ratio default is now 37.5%
Wire text offset default is now 15%
2021-08-02 16:40:36 +00:00
david-beinder bab13debcb Improve overbar rendering in PCB and global labels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8584
Moves the font slightly down in global labels
Keeps font with overbar at the same size in PCB OpenGL renderer
2021-08-02 16:40:36 +00:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Jeff Young 3288971a7c Allow titleblock vars to be resolved outside the titleblock.
Also implements some variable resolving for Altium imports.
2021-07-06 13:30:17 +01:00
Jeff Young 64f07ea9c6 Update text variables after changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8697
2021-06-29 13:55:06 +01:00
Jeff Young ceb23c3aac Don't display legacy placeholder for empty string ("~"). 2021-06-12 18:58:15 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 5f581aa6ad Move some LABEL_SPIN_STYLE to the cpp to add back warnings 2021-06-02 00:26:16 -04:00
Wayne Stambaugh ebd53cd45c Eeschema: fix text justification terminology.
Use justification instead of orientation relative to the anchor point when
describing text direction and alignment.  This seems to be the preferred
method by most users so hopefully this will eliminate some confusion.

Fix a bug in the s-expression schematic parser that failed to take into
account how graphical text alignment is defined for graphic text objects
compared to label text objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/6489
2021-05-14 13:44:17 -04:00
Jeff Young c7d689a022 Show field children when creating new labels.
And in particular, show reasonable intersheet reference facsimiles.
2021-04-02 15:15:07 +01:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +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
jean-pierre charras 2bc22de1a5 Eeschema: fix crash when opening preferences, due to null pointer.
In panel preview, Schematic() returns a null pointer.
Fixes #7869
https://gitlab.com/kicad/code/kicad/issues/7869
2021-03-11 08:20:27 +01:00
jean-pierre charras 33f465f754 SCH_GLOBALLABEL::GetBoundingBox(): do not include IREF when not shown. 2021-03-10 18:38:38 +01:00
jean-pierre charras d295b5d6de SCH_GLOBALLABEL: fix broken position of IREF, creating a broken bounding box.
Note also the bounding box is too large when the IREF  is not shown, because
IREF is always included, even if not shown.
Fixes #7864
https://gitlab.com/kicad/code/kicad/issues/7864
2021-03-10 17:58:44 +01:00
Jeff Young e4590e4762 Make sure SCH_GLOBALLABEL's bounding box includes its intersheet ref.
Fixes https://gitlab.com/kicad/code/kicad/issues/7819
2021-03-09 12:08:33 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Franck Jullien c16199c3f9 eeschema: add a setting to allow intersheets to not list their own page
Also disable inter-sheet options when "Show inter-sheet references" is
not checked.
2021-03-08 20:40:37 +00:00
Jeff Young b9d26a55f2 Show variable references of text in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/7790
2021-03-03 18:58:04 +00:00
Seth Hillbrand f73039cb18 Fix wire endings both too small and too large
Junctions should only be wire endings when ending directly on the wire.
This is the requirement for netlisting, so we need to follow it in the
auto-end as well.

SCH_LABEL needs to allow ending because any wire that touches the label
will be connected, so there's a use case for this.  However, the
bounding box for local labels did not include their connection point, so
we increase that box a bit.  Note that this might have the opposite
effect to https://gitlab.com/kicad/code/kicad/-/issues/7689

Fixes https://gitlab.com/kicad/code/kicad/issues/7714
2021-02-25 16:27:05 -08:00