Commit Graph

6839 Commits

Author SHA1 Message Date
Jeff Young 808ab92834 Simplify default format for exporting netlist.
It's now just remembers the last-shown tab.

Fixes https://gitlab.com/kicad/code/kicad/issues/7618
2021-02-26 00:36:39 +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
Jeff Young b8c95345d0 Make sure reporters have a better default path than /bin. 2021-02-25 15:05:26 +00:00
jean-pierre charras 1ac81c04e5 Bugfix for "Edit text and graphic properties" dialog: vertical alignment code
erroneously checked against change in horizontal alignment UI item
2021-02-25 12:52:04 +01:00
jean-pierre charras cfa3f3afeb Fix compil issue. 2021-02-25 10:44:14 +01:00
jean-pierre charras 9797bc5f25 Left Mouse Button: use same modifiers for Pcbnew, Eeschema and pleditor for selection.
It also means the "force disambiguation menu" uses now Ctrl in Eeschema and pleditor.
2021-02-25 08:22:35 +01:00
Jon Evans 8d62c73b86 Eeschema: overhaul storage of BOM plugin settings
CHANGED: BOM generator plugins are no longer loaded by
         searching all plugin directories; instead a
         fixed default set of plugins is provided.

Also:

- Move from sexpr to JSON
- Support both full-path and no-path specifications of plugins
- Add a Reset to Defaults button to reset the list

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7633
2021-02-24 22:45:42 -05:00
Wayne Stambaugh 9f42b5e8c7 Attempt to fix Coverity issue 316502. 2021-02-24 17:36:11 -05:00
Jon Evans 92cc88f87c Tighten up schematic label bounding boxes
Margins were being added in more places than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7689
2021-02-24 17:15:35 -05:00
Seth Hillbrand 0bab025832 Fixup toolchaining for immediate mode
The move tool can stack on others, so when we re-enter the previous tool
this caused another immediate action.  We flag re-entry in the tool
stack to check for this and avoid unexpected tool starts
2021-02-24 10:44:54 -08:00
Jeff Young 2fd5f25c3c Allow expand selection to work (even if you probably can't get there).
I think the guessSelectionCandidates narrows down to a single item
in 99.9% of cases, so we can probably remove this entirely.  But for
now it's safer just to fix it.
2021-02-24 14:12:32 +00:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
James Jackson eee04f4482 Fix Bus Management UI flow on macOS
Fixes https://gitlab.com/kicad/code/kicad/issues/7510
2021-02-24 01:32:29 +00:00
Seth Hillbrand 0518d9c546 Add more force-immediate tools 2021-02-23 17:05:03 -08:00
Seth Hillbrand 005622027f Add component/footprint is always immediate
When a user clicks on the "Add Component", "Add Power" or "Add Footprint"
icon, they want to add the item.  Requiring an extra click on the screen
before selecting the component/footprint is not needed.
2021-02-23 16:15:31 -08:00
Jeff Young 7318417ca4 Fix typo in expand-selection-disambiguation menu logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/7654
2021-02-23 22:09:00 +00:00
Jeff Young 7e2b0e63f1 Fix junction logic when splitting two wires. 2021-02-23 21:43:41 +00:00
Jeff Young c0487e5c87 Don't leave the cursor position forced.
Fixes https://gitlab.com/kicad/code/kicad/issues/7665
2021-02-23 21:43:41 +00:00
jean-pierre charras 94bc373f30 PANEL_EESCHEMA_EDITING_OPTIONS: add info about left mouse click and modifiers.
Similar to the existing info in Pcbnew editing options panel.
2021-02-23 20:40:22 +01:00
Jeff Young 8755f55956 Fix copy-paste error.
Fixes https://gitlab.com/kicad/code/kicad/issues/7674
2021-02-23 17:50:11 +00:00
Jeff Young a9ea617069 Add some defensive code for double-moves.
Fixes https://gitlab.com/kicad/code/kicad/issues/7665

Fixes https://gitlab.com/kicad/code/kicad/issues/7502
2021-02-23 16:38:18 +00:00
Jeff Young 9eb2113a50 Make TwoClickPlace cursor handling match SingleClickPlace. 2021-02-23 15:28:45 +00:00
Jeff Young e251cf067a Formatting. 2021-02-23 14:34:06 +00:00
Jeff Young d7b6d4a541 Warn user when placing a junction is just going to remove it again.
Also removes a duplicate call to SaveCopyForRepeatItem (which has
already been done in AddItemToScreenAndUndoList).

Fixes https://gitlab.com/kicad/code/kicad/issues/7651
2021-02-23 12:51:15 +00:00
Jeff Young b938df0e46 Coding policy. 2021-02-23 12:49:02 +00:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Seth Hillbrand b484c0787b Disable commands in SingleTop
We cannot do forward/reverse annotation in Single Top mode because we
depend on shared memory access.  This disables the menu options in this
case and replaces the toolbar update pcb icon with the import netlist,
which is more appropriate for single top mode

Fixes https://gitlab.com/kicad/code/kicad/issues/7637
2021-02-22 14:49:13 -08:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Roberto Fernandez Bautista ccbc0f73cc CADSTAR Schematic Archive Importer: Fix Coordinate Rounding error
Rewrite of the calculation to convert CADSTAR to KiCad coordinates,
rounding half way cases away from zero.
Use integer division instead of double, to ensure precision.
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista 842a930ced CADSTAR Schematic Archive Importer: Autoplace fields when adding sheet
Makes the sheets look a little bit better when there is no block name
in the original CADSTAR design.
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista 7b5cf955af CADSTAR Schematic Archive Importer: Visible fields to calculate BBOX
- Ensures page size is calculated correctly
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista 5acdf1ddb1 CADSTAR Schematic Archive Importer: Align to original grid
Previous assumption of 100mil grid in CADSTAR schematic designs has
been proven to be incorrect. Let's use the "working grid" in the
original design instead.
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista c98106ebcf CADSTAR Schematic Archive Importer: Parse TESTPOINT
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7574
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista 09ebfcd650 CADSTAR Importer: Fix Code Style
- Rename member variable names to use the 'm_' prefix
- Rename a few object types that clashed with KiCad object names, such
  as BOARD and SCHEMATIC, to avoid the use of '::' to access the KiCad
  objects.
- Remove some unused code.
2021-02-22 13:24:00 +00:00
Jeff Young 09d3667bce Fix bone-headed mess up of two-click-place.
Original architecture was to pass KICAD_T in to specify what kind of
object you wanted.  That didn't work well with things like cursor
shape so it was moved to setting booleans based on the ACTION.  When
I cleared out the old KICAD_T stuff I missed one case where it was
still used.  That is now corrected as well.

Fixes https://gitlab.com/kicad/code/kicad/issues/7651
2021-02-22 11:54:03 +00:00
Jon Evans f1039dfb94 Disable project saving outside explicit save actions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7589
2021-02-21 21:31:45 -05:00
Jeff Young 781d293b60 Add option for text updating to Update Symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/6420
2021-02-22 00:36:40 +00:00
Jeff Young afb4bbde47 Bug fixes to Eeschema context menu.
1) Fix typo in SingleSymbolOrPower
2) Remove Edit reference/value/footprint items for power symbols
2021-02-21 23:45:32 +00:00
Jeff Young 34d3218f73 Translation cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/6078
2021-02-21 23:13:13 +00:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Mikolaj Wielgus f9c42585fb Force immediate action for auto start wire feature
Fixes https://gitlab.com/kicad/code/kicad/issues/7503
2021-02-21 18:43:34 +00:00
Jeff Young 18d4d517b0 Implement RMB Import Sheet Pin as a single-shot.
Fixes https://gitlab.com/kicad/code/kicad/issues/7638
2021-02-21 15:46:53 +00:00
Seth Hillbrand 8a12aa4e3a Handle unit changes in the netlist
Each symbol unit in eeschema has a unique identifier.  But we don't have
a unique identifier for the entire symbol.  So changing which symbol
instance was unit A (our default base for matching), changed the UUID
that we were using to match the footprints.

This commit adds all UUIDs to the netlist, allowing us to match symbol
to footprint without worrying about which unit is referenced.

This still does not handle changing different units on different sheets.

Fixes https://gitlab.com/kicad/code/kicad/issues/7604
2021-02-20 20:11:49 -08:00
Marek Roszko 907e282347 Silence some msvc warnings
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Jeff Young 91e876ce0d Make sure the title is updated when file is saved/reverted/etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7626
2021-02-20 15:09:47 +00:00
Jeff Young 881cb3182b Move writable dir checking lower down.
(Well, it was already lower down, this really just removes the higher
up calls that were getting in the way.)

Fixes https://gitlab.com/kicad/code/kicad/issues/5937
2021-02-19 22:24:08 +00:00
Jeff Young 5994ce3711 Be more aggressive about updating title to show dirty status.
Fixes https://gitlab.com/kicad/code/kicad/issues/7613
2021-02-19 21:58:49 +00:00
Jeff Young 1a36971583 Remove higher-level write-protected check. It's now done lower down.
Fixes https://gitlab.com/kicad/code/kicad/issues/5937
2021-02-19 21:46:06 +00:00
Jeff Young 26cb05051b fixup! Whittle down library tree context menus to be more contextual. 2021-02-19 19:07:45 +00:00
Jeff Young 57e043e0e6 Don't allow moving markers. Do allow excluding them. 2021-02-19 19:07:45 +00:00
Jeff Young c2f68ca4da Whittle down library tree context menus to be more contextual.
(From discussion on Zulip.)
2021-02-19 19:07:45 +00: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
jean-pierre charras 9cc2781d55 typo 2021-02-19 10:35:25 +01:00
jean-pierre charras d0ca01be22 DIALOG_EDIT_COMPONENTS_LIBID: do not replace fields by default.
Values entered by the user will be lost and the schematic can be broken.
This is especially true for generic components.
Add also a tool tip for this option.
2021-02-19 09:37:53 +01:00
Seth Hillbrand 05b559c9dc Quiet gcc warnings 2021-02-18 11:20:27 -08:00
Jeff Young b43db7cd7d Fix assert in Symbol Editor.
Also allows some symbol lib operations when we know the context even
if the library itself isn't selected.  (For instance, select a symbol,
copy, paste.)
2021-02-18 18:08:37 +00:00
Zoltan Gyarmati 0df1558e10 eeschema: update symbol fields when editing Symbol Library links
Also making this behavior optional via a adding checkbox to the
Edit Symbol Library Links dialog.

Fixes: https://gitlab.com/kicad/code/kicad/issues/7010
2021-02-18 18:06:11 +00:00
Jon Evans d951ac5bfe Fix logic issue with sheet pin ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7592
2021-02-18 12:10:59 -05:00
Jeff Young 66b33834b5 Always enable save; move dirty bit to asterisk in title bar.
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Jeff Young 6a5bba2a80 We don't really want users hand-editing library table files.
Fixes https://gitlab.com/kicad/code/kicad/issues/7591
2021-02-18 11:53:36 +00:00
Jeff Young b2a4cbedda Add conditions for rotate/group/lock items in toolbar.
Also fixes cut/copy/delete conditions to allow use in immediate mode.
2021-02-18 00:10:41 +00:00
Marek Roszko b80fdad511 Don't generate a format specifier length of ":"
It's ambiguous, are we talking the length of a human colon or a pigs?

Fix #7556
2021-02-17 18:53:07 -05:00
Seth Hillbrand a25dfcd1b4 Allow "Update Symbol" command on power symbols
Power symbols can be modified in the library so it is useful to allow
them to be updated with the right-click menu
2021-02-17 15:31:22 -08:00
Jon Evans 309fb0825c Eeschema: allow auto-wiring from zero-length pins (e.g. power symbols) 2021-02-17 12:29:19 -05:00
Jeff Young b6a7981e62 Write changes back to grid after using file explorer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7361
2021-02-17 14:08:53 +00:00
Marek Roszko b609c7dcd6 Kick the osx specific path helpers into PATHS 2021-02-16 23:29:26 -05:00
Sylwester Kocjan 114043fe93 eeschema: add interface to SCHEMATIC for better testability
- added abstract class SCHEMATIC_IFACE
- added missing 'virtual' keyword at destructor
2021-02-17 00:59:44 +00:00
Seth Hillbrand dbbe9cdee4 Hide infobar for save when saving 2021-02-16 15:54:43 -08:00
Marek Roszko f9c7eae63a Avoid null access in NGSPICE::AllPlots 2021-02-16 18:37:57 -05:00
Jeff Young 2c4d53d994 Minor cleanup. 2021-02-16 21:11:36 +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
Seth Hillbrand 24795f5b12 Fix overzealous breakSegments()
We cannot break segements that are merely close or on endpoints, so we
filter these prior to the break routine.  Failing to do this was
overloading our undo stack with bogus values

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7554
2021-02-16 10:12:30 -08:00
Jeff Young 4408897b87 Formatting. 2021-02-16 16:24:37 +00:00
Wayne Stambaugh 114dceec2e Eeschema: Eagle schematic plugin parser improvements.
* Complete drawing of sheet border/title block symbol.
2021-02-16 09:33:15 -05:00
Jeff Young a1f510ef6a Make sure migrated aliases get hooked up to migrated parents.
Fixes https://gitlab.com/kicad/code/kicad/issues/7322
2021-02-16 12:49:06 +00:00
Zoltan Gyarmati f997deec75 eeschema: fixing title block variable expanding in text objects
Also fixing an off-by-one error, which also affects pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7489
2021-02-15 22:24:05 +00:00
Wayne Stambaugh 089b7afacf Eeschema: Eagle schematic plugin parser improvements.
* Fix multi line text alignment.
* Parse schematic frame objects and convert them to lines.
* Make implicit global labels normal size so they can easily be seen.
* Move sheet fields to a more sensible position.
* Parse schematic symbol instances before wires so that the implicit power
  connections can properly be tested.  This will be used at a later time.
* Scale label text size down to allow for differences in label offset and
  graphical items.
2021-02-15 16:44:58 -05:00
Seth Hillbrand d93ba0a06a Choose half-grid for mirror
Using the half-grid allows for odd-grid counts to remain on-grid,
closer to the actual center.

Fixes https://gitlab.com/kicad/code/kicad/issues/7493
2021-02-15 11:59:04 -08:00
Seth Hillbrand 55e34592a6 Fix expand selection option in Eeschema 2021-02-15 10:53:17 -08:00
Seth Hillbrand 8745691da3 Toggle LOCALE_IO before re-caching
cacheLib() can cause a re-load event, which requires the C-locale.
LOCALE_IO needs to be set before this event to prevent mistaken ','/'.'
mixups

Fixes https://gitlab.com/kicad/code/kicad/issues/6434
2021-02-15 09:10:21 -08:00
James 9205f1571d EE_SELECTION_TOOL correctly identifies buses and wires for auto starting 2021-02-15 14:57:06 +00:00
Jeff Young cf42d692bf Remove some dead code. A little bit of comment cleanup as well. 2021-02-15 14:13:43 +00:00
Jon Evans 212c67c365 Fix bus<>net conflict ERC not checking local labels 2021-02-14 21:35:29 -05:00
Jon Evans 8135abffde Allow applying global edit actions to selected items only 2021-02-14 18:39:33 -05:00
Jeff Young ec20121114 Make sure schematic symbol fields get transferred to symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/7501
2021-02-14 18:30:14 +00:00
Jeff Young 0f463ee84b Add Update Symbol Fields dialog for derived symbols.
ADDED This allows one to update a derived symbol's fields from the
parent symbol.

Fixes https://gitlab.com/kicad/code/kicad/issues/7168
2021-02-14 12:15:26 +00:00
Marek Roszko 1608282a57 Remove msys2 search paths for ngspice under msvc 2021-02-13 20:08:31 -05:00
Jon Evans c51e8ff0c6 Iterate over screens, not sheets, for bus alias loading
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7147
2021-02-13 11:04:55 -05:00
Jon Evans cb27d14ecb Allow adding a bus alias while one is selected
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7510
2021-02-13 10:55:45 -05:00
Jon Evans 07e1ae1b56 Fix logic of global label ERC check
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7392
2021-02-13 10:29:31 -05:00
Jon Evans dbd749c07a ERC warn if hierarchical labels have no matching sheet pin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7511
2021-02-13 10:24:22 -05:00
Jon Evans 7015f4cf75 Use full names for bus membership ERC checking
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7522
2021-02-13 10:09:16 -05:00
Seth Hillbrand 4f1592e5c1 Fix crash with empty undo stack 2021-02-13 06:41:10 -08:00
Seth Hillbrand 02c7fcdc84 Fix BreakWire tool
Adds ability to start new commit to eeschema, allowing all
AddItemsToUndoList to always append without foreknowledge.  Keeps newly
split wires on the tool until placed

Fixes https://gitlab.com/kicad/code/kicad/issues/7512
2021-02-12 17:17:12 -08:00
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Seth Hillbrand d244c09680 Cleanup undo/redo
Mirror/Rotate/etc were all just "Change" items in the undo/redo stack.
This removes the old calls
2021-02-12 10:25:14 -08:00
Graham Keeth f54ab830f6 Add BOM file extension to BOM plugin command line
Attempt to parse BOM output file extension from BOM plugin header, and
append it to the "%O" argument in the BOM plugin command line.

Fixes #6943
2021-02-12 02:17:45 +00:00
Jon Evans 32b12228fc Use the right sheet when looking for pins to add to netlist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7434
2021-02-11 20:50:26 -05:00
Seth Hillbrand cea9e1b62c Remove Eagle workaround for stacked NC pins
We no longer put stacked NC pins in the same net, so we do not require
this hack.
2021-02-11 16:47:21 -08:00
Jon Evans 73ea0fc15e Always upgrade to a stronger driver even if the path is longer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7492
2021-02-11 17:25:14 -05:00
Jon Evans 8e9b457887 Make sure sheet pin connections get reset every time
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7499
2021-02-11 17:25:14 -05:00
Jon Evans 1bec10b6fa Make it easy to select small things overlapping symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7487
2021-02-11 12:13:46 -05:00
Jeff Young a0b9b0c3ee Improve IsSymbolEditable to differentiate fields.
Fields are editable in Aliases, but still not in Legacy libraries,
locked libraries, etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/7175
2021-02-10 22:57:23 +00:00
Mikolaj Wielgus 1dc0ef01b3 Fix automatic wire tool in gridless mode
The automatic wire tool was not working in the gridless mode because the
grid snapping on/off logic present in `EE_GRID_HELPER`, based on the
value of `m_enableGrid`, was not taking into account that another check,
but for the global KiCad setting, would be performed in the `Align()`
method, which is inherited from `GRID_HELPER`.

I've modified all tests of `m_enableGrid` value to also take the global
setting into account, and moved checks for it to `Align()` method, as
it's more consistent this way.

I've also removed an override of the `Align()` method in the
`PCB_GRID_HELPER` class, as it was made redundant by my changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/7402
2021-02-10 22:07:49 +00:00
Roberto Fernandez Bautista 7c06bdbd2e CADSTAR Schematic Archive Importer: Fix parsing of TERMINAL_SHAPE
TRIANGLE shape and a few others do not have a "right length",
only a "length".
Fixes the error "Missing Parameter ‘2’ in ‘TRIANGLE’".
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista 80d8974f87 CADSTAR Archive Importer: Fix loading of non-cadstar font text sizes
Non-cadstar fonts use a width of 0.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 49bf957c48 CADSTAR Schematic Archive Importer: Fix positioning of global labels
Previous calculation did not take into account rotation of the labels
when calculating the final position.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 0841f3ae25 CADSTAR Schematic Archive Importer: Fix wires (Implied connections)
There is an implied connection between elements in a net even though
there might not be a graphical connection in the file.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 8add7a880d CADSTAR Schematic Archive Importer: Fix positioning and margins
Fix calculation of sheet bounding box and sheet margins with the aim
of matching CADSTAR pdf output as closely as possible.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 2c04d76ff4 Non-Kicad Schematic Importers: Do not reload all symbols after import
This is required to allow handling of pin swaps in the CADSTAR importer
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista cb90a4b7e6 CADSTAR Schematic Archive Importer: Handle Pin Swaps
Each schematic symbol instance can have pin numbers that diverge from
the pin number definitions in the library
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 4ea487936b CADSTAR Schematic Archive Importer: Simplify symbol library name 2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 552bb5821f SCH_COMPONENT: Add `const` specifier to all constructor parameters 2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 4dc264175a CADSTAR Schematic Archive Importer: Symbol name is case insensitive
Fixes an issue on some designs that would not be able to find the
symbol definition referenced by the part due to different
capitalisation of the symbol name in the part definition and
the symbol definition.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 914ae001b5 CADSTAR Schematic Archive Importer: Load pin types
Default to passive if undefined
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista f530b12c31 CADSTAR Schematic Archive Importer: Handle undefined pin number in part
Use terminal pin number (i.e. from the symbol definition) when the pin
number is undefined in the part.
This fixes a bug that resulted in symbols with "0" as the pin numbers.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista cc27c31ab0 CADSTAR Schematic Archive Importer: Import common fields visibilities
Import field visibilities for Ref, Value and Part Name
Also fix incorrect loading of designator from previous commit
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 297ff282f1 CADSTAR Importer: Update copyright years and remove white spaces 2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista bb6fee531e CADSTAR Schematic Archive Importer: Correctly load symbol instances
Previous implementation was not loading all fields defined in the
library.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista b0051c07cb CADSTAR Schematic Archive Importer: Load all fields in symbols
- Load Fields in the library items as well as schematic instances
- Remove invalid characters (e.g. '\n', '\t', '\r') in fields
- Load footprint field (assume that the footprint library name
  is the same as the filename of the schematic)
2021-02-10 18:49:20 +00:00
Seth Hillbrand 67ccee338e Give cleanup to the move tool
For unknown reasons, the move tool was not clearing the stack when
called from the edit tool.  This moves the call to move tool to after
clearing the edit tool from the stack.  The move tool handles cleanup,
so we skip the original reason for waiting on the move tool before
finalizing the edit tool routines

Fixes https://gitlab.com/kicad/code/kicad/issues/7481
2021-02-10 10:01:05 -08:00
Jeff Young a30ae6a237 Pass un-pretty-printed bus names through menu help text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7412
2021-02-10 15:03:06 +00:00
Jeff Young 05d2053ded Put MSW bug fix back in. 2021-02-10 12:37:13 +00:00
jean-pierre charras 909ebe4b78 Try to fix an annoying issue in DIALOG_SYMBOL_PROPERTIES on wxGTK.
In some cases selecting a field to change its value make this value invisible.
It happens until the dialog is resized, so I am guessing there is a problem
when initializing sizers settings.
2021-02-10 12:48:58 +01:00
Wayne Stambaugh 048050c980 Eeschema: fix power flag getters and setters for inherited symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/7474
2021-02-09 19:11:13 -05:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Seth Hillbrand 09be44a352 Use Jeff's method+font for monospace 2021-02-09 12:14:17 -08:00
Seth Hillbrand 505844f68c Generalize the Ctrl-Q to all frames
Rather than adding our handler to each frame separately, we initialize
the Ctrl-Q quit action at the base frame to be consistent
2021-02-09 11:43:42 -08:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
Jeff Young 618e824b0f Cleanup includes and formatting. 2021-02-09 12:26:46 +00:00
Seth Hillbrand 488cfb9ec7 Update GAL options when loading viewer frame
Fixes https://gitlab.com/kicad/code/kicad/issues/5941
2021-02-08 17:43:24 -08:00
Seth Hillbrand 6f0424d742 Use monospace font for textboxes
Matches the spacing of our stroke font so the tabs are correctly
displayed in WYSIWYG

Fixes https://gitlab.com/kicad/code/kicad/issues/1807
2021-02-08 15:59:58 -08:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Wayne Stambaugh 356c2d3508 Symbol editor: fix symbol save as menu enable logic issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7451
2021-02-07 18:21:59 -05:00
Jeff Young d70cebcd62 Allow clicking on terminal point to finish a bus unfold.
Fixes https://gitlab.com/kicad/code/kicad/issues/7413
2021-02-07 00:31:00 +00:00
Michael Kavanagh db66cd50d7 Use Save As icon for Save As action in symbol editor 2021-02-06 22:51:56 +00:00
Michael Kavanagh 97775aa50b Icons: redo missed simulator icon in new style 2021-02-06 22:51:56 +00:00
Jeff Young c2dbd28101 Simplify and harmonize symbol editor and footprint editor menus.
Some differences are due to difference between libraries being files
in symbol editor and directories in footprint editor, but this unifies
most of the rest.

It also dispenses with the save-to-library vs save-to-document distinction
in the GUI because it makes for too much variability in the GUI, was
implemented differently between the two editors, and isn't needed as much
anymore now that we have the highly visible infobar.

There was also an issue that the save-to-board icon occupies the same
location and has the same size/shape/colours as the Board Setup icon in
PCBNew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7215
2021-02-06 14:33:16 +00:00
Wayne Stambaugh f26b4058c2 Symbol editor: enable properties controls for inherited symbols.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7126
2021-02-06 08:28:06 -05:00
Zoltan Gyarmati 17b0117074 eeschema: fixing intersheet ref mirroring for global labels
Implementing Mirror{X,Y} overrides in SCH_GLOBALLABEL in order
to properly handle Intersheet Ref field mirroring.

Fixes: https://gitlab.com/kicad/code/kicad/issues/7225
2021-02-05 19:55:54 +00:00
Seth Hillbrand 2aa8a3724f Don't continue until the move tool completes
Starting a new action (to add junctions) will break the move tool loop
and cancel placement.  We need to wait until the tool completes before
choosing where to place the junctions

Fixes https://gitlab.com/kicad/code/kicad/issues/7421
2021-02-05 10:18:34 -08:00
Jeff Young 2ad5108e7d Don't depend on wxWidgets dotted and dashed line styles.
Turns out they're buggy on OSX.

Fixes https://gitlab.com/kicad/code/kicad/issues/7144
2021-02-05 16:18:28 +00:00
Marek Roszko e8bcdfed29 Revert 2faf721360
Fix #7323
2021-02-05 07:12:23 -05:00
Marek Roszko 4c1b4b4159 Check normalize path result instead of blindly using it.
Fix #7323 again
2021-02-05 00:52:41 -05:00
Jeff Young b4a9792e23 Add a warning for hidden power pins.
Fixes https://gitlab.com/kicad/code/kicad/issues/6440
2021-02-04 22:47:37 +00:00
jean-pierre charras b48f29161e Eeschema: cross probing pin from a pad clicked in Pcbnew: fix incorrect pos of cursor.
A transform coordinate was applied twice, breaking the position of the graphic cursor.
Fixes #7414
https://gitlab.com/kicad/code/kicad/issues/7414
2021-02-04 17:24:06 +01:00
jean-pierre charras 658a5cf7ed SCH_PIN::GetMsgPanelInfo(): fix missing initialization of Pin Number string
The displayed string was a old value, not related to the Pin Nummber
Fixes #7414
https://gitlab.com/kicad/code/kicad/issues/7414
2021-02-04 11:14:46 +01:00
Jeff Young 62254309b0 Don't rotate fields if their parent is selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7410
2021-02-04 00:05:13 +00:00
Jeff Young 2faf721360 Edit library table through backing table instead of grid.
While editing the grid works on OSX, it doesn't appear to on MSW or
GTK.  Whether or not editing the backing table is any better or not
remains to be seen....

Fixes https://gitlab.com/kicad/code/kicad/issues/7323
2021-02-03 15:50:37 +00:00
Jeff Young c220913aa1 Handle y-axis inversion in Symbol Editor when drag-selecting text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7406
2021-02-03 15:28:11 +00:00
Jeff Young ff3441143e Fix assert in setupUiConditions. 2021-02-03 14:40:19 +00:00
Seth Hillbrand b07c8110c8 Follow grid snapping when moving 2021-02-02 20:23:12 -08:00
Seth Hillbrand 97194983cd Select cells at a time
Selecting cells allows us to cut/paste from individual cells.  This is
critical to be able to paste from spreadsheets and move columns around
2021-02-02 19:33:18 -08:00
Seth Hillbrand 238aa2b5b0 Snap to eeschema lines
Allows easier snapping to lines when drawing in eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/7378
2021-02-02 19:33:18 -08:00
Seth Hillbrand ea08f1b8cb Update action short names for clarity 2021-02-02 19:33:18 -08:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Jeff Young 1c6c0bf8cf Null-ptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/7266
2021-02-02 23:09:35 +00:00
Jeff Young 8464add58c Use GetSchSymbolLibraryName() when looking up symbol in schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/7301
2021-02-02 22:55:18 +00:00
Jeff Young b8e97bb6b6 Only apply B&W printer fixes when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7388
2021-02-02 15:37:30 +00:00
RigoLigoRLC afad1625d7 Fix save-as extension of imported schematics
Fixes https://gitlab.com/kicad/code/kicad/issues/7333
2021-02-01 18:34:59 +00:00
Wayne Stambaugh c11ded24cd Add instrumentation to track down local issues in symbol library file code. 2021-02-01 12:57:16 -05:00
Jeff Young 147c839857 Allow drag-select of fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/6662
2021-02-01 17:14:30 +00:00
Marek Roszko 31fd49d444 Use the new nudge path for the symbol lib table, save global and project mru differently 2021-01-31 19:01:33 -05:00
Seth Hillbrand ae5d2efe07 Snap common single-click tools
Fixes https://gitlab.com/kicad/code/kicad/issues/7362

Fixes https://gitlab.com/kicad/code/kicad/issues/7363
2021-01-31 15:17:24 -08:00
Jeff Young bbb8173b61 Remove and re-add saved-as libraries when Syncing tree.
Also removes the aForce parameter as it was always true anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7357
2021-01-31 23:00:17 +00:00
Seth Hillbrand 8567739a7a Remove conditions from common immediate-mode keys
The conditions prevent use in immediate mode for common actions.  While
this makes enable/disable easier in menu items, this fix is a patch
until we refactor the action framework to distinguish between immediate
mode hotkeys that should start without selections and menu items that
need a selection before running.

Fixes https://gitlab.com/kicad/code/kicad/issues/5333
2021-01-31 14:45:24 -08:00
Marek Roszko de9da20bda Fix broken html 2021-01-31 17:37:47 -05:00
Marek Roszko b05bf34b77 Cleanup redundant if statement 2021-01-31 15:31:57 -05:00
Seth Hillbrand 2edcf42115 Symbol Editor IO_ERROR catching
Tests for read-only in table save routines and catches other IO_ERRORS.

Still returns a non-specific error message but prevents crashing when
erroring during save.

Fixes https://gitlab.com/kicad/code/kicad/issues/7352
2021-01-31 11:31:07 -08:00
Jeff Young dfc6070178 Unify schematic file version checking with PCBNew.
This also makes sure that the user gets a warning before saving over
an older s-expr format.  While that won't always be wanted, it's now
in the infobar (like in PCBNew), so it's not too onerous.§

Fixes https://gitlab.com/kicad/code/kicad/issues/7347
2021-01-31 17:28:14 +00:00
Marek Roszko a156acc6b0 Fix broken LIB_ITEM::Compare case 2021-01-31 11:48:05 -05:00
Marek Roszko bfa8723bb6 Add uninitialized call 2021-01-31 11:45:17 -05:00
Zoltan Gyarmati 3380617836 Axis color fixes in symbol editor
- explicitly set axis color at symbol editor start
- force redraw of grid after axis color change

Fixes: https://gitlab.com/kicad/code/kicad/issues/7160
2021-01-31 15:28:37 +00:00
Seth Hillbrand 08a932a969 Add smarts to switch selection on right-click
Now looks at how hard it is to select the item (grids) and switches only
if the mouse is more than a grid square away and there is a new item
under the mouse.

Fixes https://gitlab.com/kicad/code/kicad/issues/4455
2021-01-31 07:00:48 -08:00
Jon Evans abf0a46dce Refactor PICKER_TOOL and push up snapping disable functionality
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7348
2021-01-31 09:50:41 -05:00
jean-pierre charras c155218582 Sim plot: fix a rounding issue that can create a missing point in a plot.
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes #7345
https://gitlab.com/kicad/code/kicad/issues/7345
2021-01-31 10:36:26 +01:00
Mikolaj Wielgus 8eca23aabe Mark null project initial screen as zoom-initialized
The variable `m_Initialized` in `BASE_SCREEN` is used by
`SCH_EDIT_FRAME` to mark whether a screen had its zoom level initialized
by the "zoom to fit screen" action. When this variable is `false`, the
function `SCH_EDIT_FRAME::DisplayCurrentSheet()` performs "zoom to fit
screen", modifying the zoom level. This function is indirectly called in
the undo routines, so if `m_Initialized` is not set to `true`, a zoom
change will occur when the user undoes an operation, a behavior that is
undesired.

`m_Initialized` was not initialized to `true` for the null schematic
(the schematic that is loaded if no project is loaded), causing the
aforementioned undesired behavior.

To prevent this, I've changed the `SCH_EDIT_FRAME` constructor to set
`m_Initialized` to `true`, since it zooms to fit screen already. I've
moved `m_Initialized` from `BASE_SCREEN` to `SCH_SCREEN`, as it is used
only in Eeschema, and renamed it to `m_zoomInitialized`, a name I
believe that better describes what this variable does.

I've also introduced the function `SCH_EDIT_FRAME::initScreenZoom()` to
group the "zoom to fit screen" action with setting `m_Initialized` to
`true`, as they often should occur together.

I'd also like to say that I'm not confident whether
`SCH_EDIT_FRAME::DisplayCurrentSheet()` should perform the zoom level
initialization at this point, but I have decided to not change this
behavior for now, as the commit history suggests it's several years old.

Fixes https://gitlab.com/kicad/code/kicad/issues/7343
2021-01-31 00:49:11 +00:00
Wayne Stambaugh 7737489e57 Symbol editor: don't allow new or imported symbols in read only libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/7334
2021-01-30 13:03:05 -05:00
Jeff Young 41234a8373 Implement more precise annotation-required messages.
Also moves the message to an infobar so it's more noticeable.

Fixes https://gitlab.com/kicad/code/kicad/issues/7332
2021-01-30 16:31:27 +00:00
Jeff Young a235103e48 Redo pad & via painting (again).
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.

Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.

Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast.  The hole wall
is drawn in high contrast.  This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).

Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
Jon Evans 1d12f3fe4a Fix logic in selecting power symbols for net highlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7339
2021-01-30 10:28:26 -05:00
Thomas Pointhuber 619e128536 altium: Fix #6194 by no longer mirroring schematic text. Furthermore improve value parsing. 2021-01-30 15:44:32 +01:00
Mikolaj Wielgus babda304d9 Prevent addition of false plot when current plot panel is not in m_plots
Without this commit, when `currentPlotWindow()` returned a valid
pointer, but one that is not used as a key in `m_plots`, it would get
inserted to the `m_plots` map. Because this pointer was not properly
initialized, a crash would later occur. I think this problem was
triggered by the pointer to welcome page, but I haven't checked.

Fixes https://gitlab.com/kicad/code/kicad/issues/7324
2021-01-30 02:04:57 +01:00
Seth Hillbrand b64611af7a Make highlight net flexible with grid 2021-01-29 14:28:26 -08:00
Seth Hillbrand ea6dc0d730 Make auto-wire use snapping behavior
Forcing grid snap for the kick-start behavior loses snaps to pins that
may be desired.  This also adds force-snapping in select mode to match
the user's auto-start preferences

Fixes https://gitlab.com/kicad/code/kicad/issues/7293
2021-01-29 14:09:33 -08:00
Seth Hillbrand 02954dfaa1 Fix another instance of modifying iterators
We cannot modify the ee_rtree while iterating over it without
invalidating the iterators

Fixes https://gitlab.com/kicad/code/kicad/issues/7331
2021-01-29 08:33:44 -08:00
Jeff Young 540dd11b58 Use the file version when reading lib symbols from schematic file. 2021-01-28 21:31:33 +00:00
Seth Hillbrand 50b05aea4a Thou shalt not set minimum width 2021-01-28 10:55:27 -08:00
Marek Roszko 78dbcdcdb7 Slight fixup to previous library browse change 2021-01-28 07:31:32 -05:00
Jeff Young 69d58d39e5 Add alt pin table to compare function for LIB_PIN.
Also fixes refresh issue when editing alt pins.

Fixes https://gitlab.com/kicad/code/kicad/issues/7204
2021-01-28 11:35:18 +00:00
Jeff Young ff7742c6b8 File naming and include cleanup. 2021-01-28 11:35:18 +00:00
Marek Roszko a373abd68a Invert the new symbol library flow to push users to default to a different folder for global symbols 2021-01-28 00:40:21 -05:00
Jon Evans 77bb36a482 Ensure local names of vector bus members are preserved
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7196
2021-01-27 21:53:04 -05:00
Ian McInerney beb50c529e Reorganize the CMake folder to separate build and configure steps
The BuildSteps folder now contains the CMake scripts that are
called during the build process as individual stages, while
the root CMakeModules directory contains the CMake files used
during the configuration phase.
2021-01-28 00:24:22 +00:00
Marek Roszko e6dd95e83a Create a default user projects folder 2021-01-27 19:12:18 -05:00
Wayne Stambaugh 6a39b81647 Fix the last of broken Doxygen comment specifiers. 2021-01-27 17:39:44 -05:00
Jeff Young 7d6a749285 Implement a more aggressive re-entrancy check for SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/7259
2021-01-27 19:51:11 +00:00
Jeff Young df80f6484e Use canonical names when exporting fields to netlist.
Fixes https://gitlab.com/kicad/code/kicad/issues/7300
2021-01-27 13:52:24 +00:00
Sylwester Kocjan df62adf901 eeschema,sim: fix crash at simulation start
fixes: https://gitlab.com/kicad/code/kicad/-/issues/7277
2021-01-26 23:29:05 +00:00
Jeff Young 0967f8fc78 Fix typo. 2021-01-26 23:17:30 +00:00