277 Commits

Author SHA1 Message Date
Marek Roszko
88c7322a0d EDA_TEXT Get/SetTextSize should use VECTOR2I 2022-05-14 08:16:15 -04:00
jean-pierre charras
20d1d0705e Fix a few issues related to field names and their translation. - Do not use translated field names outside strings displayed in dialogs. - fix code that does not work well with default locale. - fix some (not all) I18n issues in DIALOG_UPDATE_SYMBOL_FIELDS. 2022-05-13 11:45:37 +02:00
Roberto Fernandez Bautista
0015574a60 ${SHEETNAME} represents the sheet name + introduce ${SHEETPATH}
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block

ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".

To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
2022-04-09 15:45:58 +01:00
Wayne Stambaugh
7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Seth Hillbrand
984eb0fb40 Handle locally-coded file names for sheets
Windows can accidentally create forward slash-coded files.  This simply
converts them to the proper unix-coded value when set

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

(cherry picked from commit 429544c188532c71149a83523e7569a8b463ca3b)
2022-03-01 17:23:30 -08:00
Seth Hillbrand
eb06ecab10 Avoid resolving text vars without screen
We need to keep the screen blank while initially loading a sheet before
the hierarchy is developed.  Avoid resolving text variables during this
process

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

(cherry picked from commit 63b06af6b13772aa55b3dd2fe8bba6c99930a5e4)
2022-02-28 12:28:02 -08: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
Jeff Young
60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Seth Hillbrand
be5bb8c4bd Enforce strictly weak ordering in sheets
This ensures that irreflexivity is given in sort ordering.  This may
have been triggering issues in MacOS when adding sheets

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

(cherry picked from commit a1615cce7edbe037c26c9eb416ebd1bd2447ab30)
2022-01-24 10:41:21 -08:00
Jeff Young
e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young
e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Marek Roszko
c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko
347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young
86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00: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
832eb0d019 Fix off-by-one error in grid snapping.
Fixes https://gitlab.com/kicad/code/kicad/issues/9013
2021-12-09 16:35:11 +00:00
Wayne Stambaugh
b7af66e3f9 Eeschema: fix broken page numbers when renaming a sheet file name.
Always use full sheet paths when storing sheet instances.  Partial sheet
paths cannot be full resolved resulting in lost page numbers when renaming
sheet file name.

Fixes #9782
2021-12-09 12:56:03 +00:00
Wayne Stambaugh
a03e6e4926 Revert "Eeschema: fix broken page numbers when renaming a sheet file name."
This reverts commit a468a79948a544aa3313b20a101b7c92dcfe3375.
2021-12-06 07:47:18 -05:00
Wayne Stambaugh
5ae844ba93 Revert "Fix SCH_SHEET object assignment operator bug."
This reverts commit 37d53a7147e68df45e88b195053b443996782546.
2021-12-06 07:47:02 -05:00
Wayne Stambaugh
37d53a7147 Fix SCH_SHEET object assignment operator bug. 2021-12-01 07:19:30 -05: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
9bb370e6b4 SCH_SHEET_PIN: Rename GetEdge, SetEdge to GetSide, SetSide 2021-11-28 20:07:06 +01:00
Mikolaj Wielgus
2e1862de1c Run AutoAutoplaceFields() in SCH_SHEET constructor
A constructor should create a fully initialized object.
2021-11-28 18:46:28 +01:00
Roberto Fernandez Bautista
3660597082 Use canonical names when saving sheet name and filename fields 2021-11-27 20:38:51 +00:00
Jeff Young
fe6cb7dbb4 Mirror sheet fields when mirroring sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/9479
2021-10-28 21:45:22 +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
935a307674 Formatting and iterator safety. 2021-10-06 11:13:16 +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
Seth Hillbrand
871bdbc952 Search sheets in hierarchy-order
Also fixes an issue where multiple sub-sheets were skipped in certain
cases

Fixes https://gitlab.com/kicad/code/kicad/issues/8972
2021-08-27 13:03:18 -07:00
Jeff Young
69fac89e86 Fix some issues with incorrectly scaled defaults given in mils. 2021-08-25 20:04:06 +01:00
Wayne Stambaugh
46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Jeff Young
fc4d748bdc Fix bugs in sheets.
1) Default_line_width is in mils, not IU.
2) Plot sheet fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/8984
2021-08-17 13:21:52 +01:00
jean-pierre charras
8c9b0bdba4 Eeschema: plot missing sheet fields.
Fixes #8984
https://gitlab.com/kicad/code/kicad/issues/8984
2021-08-17 13:30:23 +02:00
jean-pierre charras
76bdb423d7 Minor changes: minor code cleanup and fix minor Coverity warning 2021-08-04 16:47:41 +02: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
37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh
cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Jeff Young
d51ac65349 Don't try to resolve variables before the schematic is set up.
Fixes https://gitlab.com/kicad/code/kicad/issues/8746
2021-07-07 22:04:00 +01:00
Wayne Stambaugh
fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04: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
3ac5aa5369 enum class SHEET_SIDE 2021-05-30 21:23:46 -04:00
Jeff Young
2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Roberto Fernandez Bautista
2c75911669 Fix SortByPageNumbers: use Sheet Name when page numbers are equal 2021-05-03 16:54:42 +01:00
Wayne Stambaugh
2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -04:00
Jeff Young
7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +00:00
Jeff Young
7e682e9948 Don't allow pins on corners.
Fixes https://gitlab.com/kicad/code/kicad/issues/7917
2021-03-16 22:03:08 +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
Jon Evans
720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00