Commit Graph

6729 Commits

Author SHA1 Message Date
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