Commit Graph

170 Commits

Author SHA1 Message Date
Seth Hillbrand 431aa88612 Allow printing backgrounds prior to foreground
Eeschema shows background fills on a different z-level than the rest of
the symbols/elements.  Print the backgrounds prior to the foregrounds in
order to preserve this view for print output

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

(cherry picked from commit e055302a3c)
2022-10-21 09:00:13 -07:00
jean-pierre charras 8dbfe79536 Symbol Editor: Fix reverting changes on a root symbol: derived symbols are displayed wrong
Reverting changes broke links between derived symbols and the root symbol.
Now fixed by do not delete and recreate reverted symbol.
From master, commit f5fd12c0
Fixes #10792
2022-10-08 16:15:16 +02:00
Wayne Stambaugh cfde5300d7 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.

(cherry picked from commit 898ec0d094)
2022-08-17 14:07:06 -04:00
Jeff Young 3bca4f8835 Fix another case of the instance data getting messed up.
(Or, more accurately in this case, of the instance data not getting
applied to the current view.)

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

(cherry picked from commit 5295342f42)
2022-08-04 09:22:23 +01:00
Seth Hillbrand 8aabdcff9c Refresh draw objects when common settings change
Common settings may change colors so make sure that we refresh the draw
objects when the settings change to draw them in the proper colors.
Failing to do this may also cause left over lines on the screen
depending on OpenGL drivers

Fixes https://gitlab.com/kicad/code/kicad/issues/11921
2022-06-28 16:45:55 -07:00
Seth Hillbrand e05c8f8852 Catch throws in DeleteSymbol
DeleteSymbol may call SaveSymbol if the name is changed.  In this case,
SaveSymbol may throw back and needs to be caught

Fixes https://gitlab.com/kicad/code/kicad/issues/11566
2022-05-06 16:13:13 -07:00
Seth Hillbrand f4d4f23876 Catch errors when saving individual symbols
Fixes https://gitlab.com/kicad/code/kicad/issues/11566
2022-05-06 09:47:55 -07:00
Seth Hillbrand 851f893e8e Fix crash due to cleared view data
When changing fields, we need to update the view before allowing canvas
updates
2022-04-15 14:56:18 -07:00
Jeff Young 03bc9551c7 Don't save schematic symbol back to lib manager.
Also, since it doesn't get saved, changing symbols will lose any edits.
Make sure to ask the user first.

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

(cherry picked from commit 16acba34d3)
2022-04-12 13:24:14 +01:00
Jeff Young 48a776f7c5 Repair code that was supposed to be after LoadSymbol().
(Even the comment said so.)

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

(cherry picked from commit ed361925ba)
2022-04-09 21:23:18 +01:00
Jeff Young 43929781a2 On-the-fly translations for pin electrical types.
Also add on-the-fly translation for editor title bars.

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

(cherry picked from commit 68ca385e07)
2022-04-09 21:22:50 +01:00
Jeff Young f7f6ea54fe Fix incorrect m_SyncPinEdit setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/11331

(cherry picked from commit 3f9cfc0ac1)
2022-04-04 21:51:30 +01:00
Jeff Young d85e52e9fd A better is-modified test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10791

(cherry picked from commit 09ba7468ae)
2022-04-03 18:21:41 +01:00
Seth Hillbrand 802d20c409 Duplicate from selected or current
When double-clicking to open a symbol, it is no longer selected in the
tree.  We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command

Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-03-03 15:20:30 -08:00
Jeff Young 6341548939 Infobar warning if symbol loading was cancelled.
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).

Also makes sure that any cancel in the preLoad step is honoured in the
sync step.  (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)

Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.

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

(cherry picked from commit 1f16092e29)
2022-02-27 18:20:25 +00:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Seth Hillbrand a444addd89 Default eeschema strings to wide
Prevents stack bug on MacOS
2022-02-08 15:14:54 -08:00
dana 57d58fe335 Handle Unicode clipboard data in pcbnew and symbol editor
Fixes #10323

(cherry picked from commit 8373180cbb)
2022-01-12 09:23:24 -08:00
Seth Hillbrand b8a7a66a0a Keep symbol synced with edit tool
Undo/Redo can change the symbol referenced by the symbol drawing tool.
This updates the current symbol before important steps to keep the
system synced

Fixes https://gitlab.com/kicad/code/kicad/issues/10125
2022-01-05 16:51:41 -08:00
Jeff Young 76fd029cd6 Don't leave stranded symbols/footprints in editors when doc closes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10026

(cherry picked from commit 9af33cdfe8)
2021-12-23 17:01:25 +00:00
Jeff Young 4f60d7ac78 Don't use lib tree target if lib tree isn't shown.
Fixes https://gitlab.com/kicad/code/kicad/issues/9913
2021-12-10 00:34:22 +00:00
Jeff Young 87e71072b1 Default line width to 0 in symbol editor.
Also removes some atrophied settings for repeated non-pins in
symbol editor (which only ever repeats pins).

Fixes https://gitlab.com/kicad/code/kicad/issues/9776
2021-11-27 11:53:38 +00:00
Roberto Fernandez Bautista 2eb5d4fa7a Symbol Editor: Allow save as all the time, as long as we have a symbol to save
There doesn't appear to be any reason why the LIBID needs to be populated
before a "save as", seeing as the user will be inputting the new lib name
and lib nickname via the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9744
2021-11-24 19:43:09 +00:00
Seth Hillbrand 3f2d86adec Make OpenGL default for all apps
Fixes https://gitlab.com/kicad/code/kicad/issues/9699
2021-11-21 12:33:07 -08:00
Jeff Young c1703212dc "Document" properties go in File menu; Edit menu is for item props. 2021-11-20 22:44:43 +00:00
Jeff Young c01649fc6e Make it easier to open legacy files. 2021-11-19 13:36:14 +00:00
Jeff Young 12a75ffb94 A fuller implementation of allowing cut/copy/paste in search boxes.
This one also works for other text entry widgets, and also works
for other frames.
2021-11-15 18:13:35 +00:00
Jeff Young efc64e972c Fix pasting into LIB_TREE search control.
We have a hack for turning accelerator keys that wxWidgets turns into
menu commands back in to accelerator keys -- but it requires that the
corresponding menu items be enabled in order to work.
2021-11-13 19:45:10 +00:00
Jeff Young cc6e3841ae Formatting. 2021-11-13 19:45:10 +00:00
Jeff Young da58e9ee4c Don't rely on selection when updating edited symbol in schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/9600
2021-11-11 16:43:06 +00:00
Seth Hillbrand 6e5a918377 Writeable -> Writable 2021-11-08 15:56:51 -08:00
Seth Hillbrand dd99b2dc2f Add action to edit symbol from Library
Analog of ea4e06124e for symbol editor.  Allows scripting to open
library symbol
2021-10-26 12:59:59 -07:00
Seth Hillbrand 512ba167e8 Escape symbols when adding to library
Can't escape by default because the allowed characters differ in the
read-only libraries and existing schematics that reference them.  So,
escape when we import into standard KiCad Libraries

Fixes https://gitlab.com/kicad/code/kicad/issues/9419
2021-10-18 10:42:58 -07:00
Seth Hillbrand 9a8d1246cc We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Jeff Young 574bef2237 Normalize drawing sheet path to env vars & prj, not just prj.
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
2021-10-02 23:39:45 +01:00
Jeff Young ef74421922 Move centering of lib-tree item to idle event.
Fixes https://gitlab.com/kicad/code/kicad/issues/9294
2021-10-01 22:46:14 +01:00
Jeff Young 5f5ee7335d Formatting. 2021-10-01 21:49:14 +01:00
Jeff Young b9596a0a5d Update dangling flags in color settings' preview. 2021-09-30 18:53:39 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +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
Jeff Young 69fac89e86 Fix some issues with incorrectly scaled defaults given in mils. 2021-08-25 20:04:06 +01:00
Wayne Stambaugh 1d8fd22cd8 Symbol editor: fix message panel units when selecting from combo box.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8991
2021-08-20 15:45:57 -04:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh 6427197962 Remove duplicate headers in plot and associated code. 2021-08-17 15:41:25 -04:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
Jeff Young 6eb59b9d9e Dialog naming conventions. 2021-08-06 20:54:26 +01:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Seth Hillbrand d5abbd0d14 Allow overwriting existing symbols
This allows the workflow:
1) Edit symbol in schematic
2) Save As to original library

Also allows the user to quickly overwrite a symbol they don't want,
either by importing over the existing symbol or creating a new one.
2021-07-30 10:36:08 -07: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
Jeff Young 46338403e7 Unwrap some std::library typedefs. 2021-07-28 22:16:38 +01:00