Commit Graph

840 Commits

Author SHA1 Message Date
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 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
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 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
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
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
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 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
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
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05: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
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 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 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
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
Ian McInerney 908de37e7c Don't hardcode the file extensions where possible 2021-03-03 01:13:59 +00:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01: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
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
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
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 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
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 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 a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +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
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
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
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 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
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