Commit Graph

6839 Commits

Author SHA1 Message Date
Jon Evans ba67acf348 Fix wx3.0 build 2021-03-19 22:11:54 -04:00
Jeff Young f0e6f812ff Edit One Field improvements.
1) Accept <enter> as OK if the multiline textbox isn't shown.
2) Focus and select all in first control if multiline textbox isn't shown.
3) Make title be title caps ("Edit Sheet name Field" looked dorky).

Fixes https://gitlab.com/kicad/code/kicad/issues/7940
2021-03-20 00:41:09 +00:00
Jon Evans 82a4cacb4f Add threaded library load to symbol editor 2021-03-19 20:23:54 -04:00
Jeff Young 2e129d9b47 Naming conventions and other cleanup. 2021-03-19 23:06:19 +00:00
Jeff Young 7a13ad7b17 Consistent naming. 2021-03-19 23:06:19 +00:00
Jon Evans 4b46c0c954 Make sure nested settings get released in dtor
Also fix a crash if sim window can't be created because
ngspice shared library could not be found

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7969
2021-03-19 19:04:27 -04:00
Ian McInerney 6c3cf33170 Cleanup some compiler warnings 2021-03-19 21:18:45 +00:00
Jeff Young 30ac8de734 Honour component transforms when rotating fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/7964
2021-03-19 19:33:36 +00:00
Jeff Young e560de496c Intersheet refs don't go in the view themselves.
(Their parents draw them.)

Also simplifies a couple of loops by using OfType().

Fixes https://gitlab.com/kicad/code/kicad/issues/7805
2021-03-19 16:14:34 +00:00
Wayne Stambaugh dbb0a125ac Fix build error when spice simulator build option is disabled. 2021-03-19 09:04:28 -04:00
Jon Evans 472d0e03fc Remove unused color layer 2021-03-18 22:30:24 -04:00
Jon Evans 93c991926f Use threading for loading symbol libraries 2021-03-19 00:56:26 +00:00
Jeff Young 9c02e3ea63 Don't consider 0-length-lines when checking for junctions.
Also don't put junctions on labels in the middle of a wire.

Fixes https://gitlab.com/kicad/code/kicad/issues/7951
2021-03-18 23:50:04 +00:00
Wayne Stambaugh acec6ad7fc Spice simulator: add Ngspce model behavior mode settings.
ADDED: Ngspice simulator model behavior mode settings for PSpice, LTSpice,
       PSpice and LTSpice, and HSpice.

Fixes https://gitlab.com/kicad/code/kicad/issues/5810
2021-03-18 15:31:02 -04:00
Jeff Young 1641d6da79 Go back to separate junction logic for wires and buses.
Also makes sure we don't add wire width in to hit-test calculations.

Fixes https://gitlab.com/kicad/code/kicad/issues/7951
2021-03-18 18:32:01 +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
Jeff Young e206a9d39a Naming conventions. 2021-03-18 12:28:24 +00:00
Jeff Young cc70a9fa98 New components must be added to the screen.
Fixes https://gitlab.com/kicad/code/kicad/issues/7952
2021-03-18 12:28:24 +00:00
Jeff Young 35d17929ff Add specific warning for no symbol library selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7954
2021-03-18 12:28:24 +00:00
Jeff Young 36259b1f6b Refresh lib trees after editing library tables.
Also make sure that we grab the library item descriptions from their
source rather than just the cached tree copy.

Fixes https://gitlab.com/kicad/code/kicad/issues/7875
2021-03-17 14:54:18 +00:00
Jon Evans 6d502cb2a5 Don't generate real random UUIDs while loading libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7921
2021-03-17 00:43:13 +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
Jeff Young 30fdba4cbb Finish grid-snapping impl. 2021-03-16 22:03:08 +00:00
Mario Luzeiro 4e63aefaab Call Layout OnSizeGrid
Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2021-03-16 21:59:44 +00:00
Mikolaj Wielgus ee4bc8b1d0 Fix default line width for symbol editor graphic items, add validation
There was a mils to iu conversion missing for line width (the default
values are in mils).

Fixes https://gitlab.com/kicad/code/kicad/issues/7813
2021-03-16 13:50:41 +00:00
Jeff Young 2bafc1af00 Give up on using preview layer for PlaceComponent.
1) Cloning the component fails to select all its pins.
2) Something about the layer compositing causes light selection shadows
to get even lighter.  The default pretty much disappears.

Fixes https://gitlab.com/kicad/code/kicad/issues/7908
2021-03-15 19:04:59 +00:00
Jeff Young 82af98b08e Now that user can specify alpha we don't need to add in more. 2021-03-15 19:04:59 +00:00
Julian Fellinger de12ebf16f Check if symbol is disabled first
By checking for disabledness of the symbol first we skip potentially unnecessary
validation that in turn would throw an unnecessary warning

Fixes https://gitlab.com/kicad/code/kicad/issues/7338
2021-03-15 08:39:46 -07:00
Jeff Young 573dd36515 Handle <delete> in move and drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/7924
2021-03-15 14:23:54 +00:00
Jeff Young afab60ae06 Fixes for autoplace fields.
1) Don't factor in pin names when computing symbol body boundingbox.
2) Grid-snap only in the axis corresponding to the layout side.
3) We only need interline spacing *between* lines, not for each line.
4) Also cleans up the unit checking logic as the unit can't be more
than 0 unless it's a multi-unit symbol.

Fixes https://gitlab.com/kicad/code/kicad/issues/7907
2021-03-15 02:23:29 +00:00
Jeff Young 7415bf0c62 Don't hide (or disable) options if it's not obvious why.
It deprives us of the opportunity to inform the user what the conditions
are.
2021-03-15 02:23:29 +00:00
Thomas Pointhuber 4482b3baba altium: Handle special strings and convert them into KiCad variables. Use Comment for VALUE.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7736
2021-03-14 16:40:36 +01:00
Jeff Young e34734c230 Make sure pasted sheet instances get added.
Fixes https://gitlab.com/kicad/code/kicad/issues/7872
2021-03-13 16:34:30 +00:00
Wayne Stambaugh a79974fb92 Symbol editor: fix segfault when saving library with renamed symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/7866
2021-03-13 08:28:52 -05:00
Jeff Young b71ab01de4 More wxWidgets 3.1 layout adjustments. 2021-03-13 00:00:38 +00:00
Jeff Young 3e947553f5 Adjust pin conflicts table for wxWidgets 3.1. 2021-03-13 00:00:38 +00:00
Jeff Young faf9cca938 Fix many cases of old mils flag getting interpreted as allowEval flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/7883
2021-03-12 15:15:50 +00:00
Jon Evans b20f18e6c5 Properly handle mixed-up group buses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7870
2021-03-11 18:24:39 -05:00
Jon Evans 44f88f840c Bitmaps: a few improvements from review 2021-03-11 08:37:35 -05: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 068e85c567 Reset moved flag after completing move.
Fixes https://gitlab.com/kicad/code/kicad/issues/7818
2021-03-10 16:00:28 +00:00
Jeff Young 861ad0b6ec Don't bloat layout. 2021-03-10 16:00:28 +00:00
Wayne Stambaugh fb29b4f946 Eeschema: add missing symbol cache library file warning.
Fixes https://gitlab.com/kicad/code/kicad/issues/7346
2021-03-10 09:52:53 -05:00
Jeff Young e48f86bfd6 Move default assignment on Mac.
CHANGED: add corner and repeat last command now default to 'I' instead
of '<insert>' on Mac.

1) wxWidgets doesn't currently display the correct graphic in the menu
for the insert key
2) Mac laptops don't have an instert key

Fixes https://gitlab.com/kicad/code/kicad/issues/5016
2021-03-10 13:35:04 +00:00
Marek Roszko 3d4ac9af03 Relocate win32 resource files to the central folder for further consolidation 2021-03-09 21:48:14 -05:00
Jeff Young 8be3ff5a0a Perform a slightly more aggressive cleanup.
Also removes the functionality that selects the newly-added item as
we don't do that with any of the other drawing tools.

Fixes https://gitlab.com/kicad/code/kicad/issues/7833
2021-03-09 21:42:35 +00:00
Jonathan Haas 14f00271a4 Fix typo in the schematics help text. Align bottom example properly, as the subscript letters are smaller. 2021-03-09 16:23:12 +00:00
Jeff Young 2a9186d9e9 Don't re-use FieldIDs when assigning ids on save.
Fixes https://gitlab.com/kicad/code/kicad/issues/7849
2021-03-09 15:09:31 +00: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
Jeff Young 3c8e35249c Mac doesn't like menus that start with ID 0.
Fixes https://gitlab.com/kicad/code/kicad/issues/7845
2021-03-09 12:08:33 +00:00
jean-pierre charras ae15098a5d Make a menuitem name translatable and understandable. 2021-03-09 12:53:44 +01: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
jean-pierre charras 14b1d36b38 Simulator: Fix a ugly bug that happens is some simulations
TRhe initial code was broken.
2021-03-08 20:01:36 +01:00
jean-pierre charras 638a9b693d SIM_PLOT_FRAME_BASE: minor cosmetic enhancements and fix a incorrect wxmenu
name in the .fbp file that prevent to rebuild working .cpp and .h files.
2021-03-08 16:33:08 +01:00
Jeff Young 6fd247a152 Check for active tool as well as items.
Fixes https://gitlab.com/kicad/code/kicad/issues/7821
2021-03-08 14:09:43 +00:00
jean-pierre charras c1003e2ddd Fix missing call to Layout() in SIM_PLOT_FRAME after adding widgets.
Fix a minor wxWidgets warning.
2021-03-08 13:49:45 +01:00
jean-pierre charras 8285f2a223 Fix a compil error. 2021-03-08 12:45:00 +01:00
Jeff Young ed61440d2a Improve clarity. 2021-03-08 11:07:35 +00:00
Jonatan Liljedahl 5b70508624 dialog_sim_settings: don't try to read current wxChoice selection if no choices.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7823
2021-03-08 09:36:15 +00:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
jean-pierre charras 7f9890adaa Fix a install issue after changing a plugin filename (by commit a0f57d6) 2021-03-07 20:57:09 +01:00
Graham Keeth a0f57d6846 Cleanup BOM script descriptions
- make descriptions consistent
- fix inaccuracies
- describe what scripts do more precisely
2021-03-07 16:33:59 +00:00
Jeff Young 22b4a74bfa Don't forget intersheet refs when collecting non-view items.
Fixes https://gitlab.com/kicad/code/kicad/issues/7819
2021-03-07 15:04:01 +00:00
Jeff Young 3ab1ef7b83 Formatting. 2021-03-07 15:04:01 +00:00
Jeff Young b691c18bfc Allow netclass assignents to unnamed nets.
Most of the code had already moved over to this, but there were a few
hold-outs.

Fixes https://gitlab.com/kicad/code/kicad/issues/7802
2021-03-05 19:16:09 +00:00
PJM 0fc8a9d89a Eeschema: Fix ctrl-MMB double click to perform 'Zoom to Objects'
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
2021-03-04 22:43:03 -08:00
Jon Evans 5ca7a2c457 Fix some issues with group bus prefix handling
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7196
2021-03-04 23:37:46 -05:00
Jon Evans 4ddb942ec0 Do not allow drag selection or drag move when already moving something
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7800
2021-03-04 19:01:31 -05:00
Wayne Stambaugh 6cdc3664ba Symbol editor: fix crash whe changing symbol name.
Fixes https://gitlab.com/kicad/code/kicad/issues/7791
2021-03-04 18:21:41 -05:00
Wayne Stambaugh 7a00e01b3e Eeschema: fix false positive library symbol changed ERC errors.
This fix required sorting all of the LIB_PART draw items to ensure
accurate comparison between the symbols stored in the schematic and the
original library symbols.  This has a noticeable impact on symbol library
load performance.  It may also cause significant changes the next time
the library is saved due to changes in the draw item sorting.  Hashing
may be a better solution here but this addressed the immediate problem.

A skeleton method SCH_SCREEN::SwapSymbolLinks() was added because there
is most likely an issue with orphaned symbols in the schematic library
symbol cache during undo/redo operations.  More testing is required to
verify this.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7263
2021-03-04 17:59:24 -05:00
WhiteChairFromIkea ff23f4324a Do not hardcode altium file extension length 2021-03-04 12:20:40 +00:00
Marek Roszko 8831c5567c Add win32 version manifest block 2021-03-04 00:34:48 -05:00
Jon Evans 1fc399fa31 Fix a few more cases of picking up wrong mouse positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7745
2021-03-03 20:09:24 -05: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
Ian McInerney 908de37e7c Don't hardcode the file extensions where possible 2021-03-03 01:13:59 +00:00
Ian McInerney 69e310918e Update singletop eeschema to append the new schematic extension
This is used when launching a single top instance and no extension
is supplied to the filename given.
2021-03-03 01:13:59 +00:00
Wayne Stambaugh 0ce8bce753 Symbol editor: fix symbol renaming bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/7616
2021-03-02 19:19:08 -05:00
WhiteChairFromIkea 2c289b3f35 Check for ".SchDoc" before replacing to ".kicad_sch" for subsheet 2021-03-02 22:30:08 +00:00
WhiteChairFromIkea f83b9236ac Formatting 2021-03-02 22:30:08 +00:00
WhiteChairFromIkea b98602583c Remove "SchDoc" and use "kicad_sch" instead for subsheet names 2021-03-02 22:30:08 +00:00
WhiteChairFromIkea 042ea9761c Revert "Import footprint to symbols. Subsheet is name is prepended to footprint name,..."
This reverts commit 8aa4faa4ce24adc6310223952e8b5773ce245778
2021-03-02 22:30:08 +00:00
WhiteChairFromIkea 292aff48fd Import footprint to symbols. Subsheet is name is prepended to footprint name, which is probably NOT OK when syncing with PCB. 2021-03-02 22:30:08 +00:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01:00
Jon Evans f6064523a3 Use valid diff pair suffixes in label help example 2021-03-01 21:47:29 -05:00
Jeff Young 7760570d76 Treat action buttons in Symbol/Footprint Properties as OK, not Cancel.
Fixes https://gitlab.com/kicad/code/kicad/issues/7001
2021-03-01 20:37:04 +00:00
Jeff Young 57e948ff08 Make sure axesEnabled is set before saving config.
We don't actually allow the user to change this at present, so one
could argue that we should remove it from what is saved out of the
config.  But this is a smaller, safer change.

Fixes https://gitlab.com/kicad/code/kicad/issues/7666
2021-03-01 20:37:04 +00:00
Sylwester Kocjan 959ae73a01 Eeschema,sim: extract plot colors to new class 2021-03-01 18:50:37 +00:00
Jon Evans 375cd12258 Eeschema: never replace event position in wire drawing tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7745
2021-03-01 12:17:18 -05:00
Jeff Young 5bc2285aef Fix another failure of dynamic_cast<>.
Fixes https://gitlab.com/kicad/code/kicad/issues/7767
2021-03-01 14:46:27 +00:00
Jeff Young 8a33542bcd SCH_COMPONENT::GetField() expects a vector index, not a field id.
Check this at compile time.  Callers wanting to use an index now must
use SCH_COMPONENT::GetFields()[i] instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/7757
2021-02-28 15:10:37 +00:00
jean-pierre charras 13bcfc79a1 Eeschema, DIALOG_ERC: fix minor issues:
- avoid printing twice the messages when running tests (Report() was called twice).
- when saving the report open the project directory by default.
2021-02-28 15:52:14 +01:00
Jeff Young 8ab1f957a2 Update title after a Save All.
Fixes https://gitlab.com/kicad/code/kicad/issues/7752
2021-02-27 23:17:48 +00:00
Jeff Young 790e97a398 Only report "done" once, and be a (bit) more descriptive about it.
Fixes https://gitlab.com/kicad/code/kicad/issues/7743
2021-02-27 20:28:06 +00:00
PJM d8089ed54a Eeschema: Adds wire when dragging directly connected labels
CHANGED: KiCAD allows connecting components directly together in
schematics.  If the user drags one of the components, KiCAD
adds a wire to keep the conection intact.  It should do the same for
net and global labels but it doesn't.

This MR adds net and global labels to the list of items that can connect
to other items.

Fixes https://gitlab.com/kicad/code/kicad/issues/7713
2021-02-26 22:56:28 -08:00
Roberto Fernandez Bautista 76ef98339d CADSTAR PCB Archive Importer: Re-write loading of power symbols
Ensure all each power symbol is unique for each net name even
if it uses the same graphical symbol.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7722
2021-02-26 19:32:44 +00:00
Jon Evans 7fda7438f9 BOM dialog: explain when we can't find scripts
Also default to the user plugin dir when adding a new plugin,
and don't convert filenames to full path on save.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7719
2021-02-25 22:41:12 -05:00