Ian McInerney
1a727558b0
Switch update event handlers to use the event instead of pointers
...
It is safer to use the event to pass the enable/string
instead of pointers, since using the pointers could trigger
other UI events.
2021-04-07 17:39:48 +01:00
Jeff Young
21d4197eab
Apply SPECIAL_CASE_LABEL_INFO architecture to one-ended-drag.
...
We've been doing this for some time to wires that are attached to
the moving block (and therefore have the other end anchored). However
we also need to apply it when dragging a single end of a wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/7807
2021-04-07 14:40:07 +01:00
Jeff Young
30a073c2bb
Cleanup.
2021-04-07 14:40:07 +01:00
Jeff Young
895f3de455
Formatting.
2021-04-07 14:40:07 +01:00
Wayne Stambaugh
2b86b34124
Eeschema: split out SCH_SHEET_PIN declarations into separate header.
2021-04-06 17:15:49 -04:00
Wayne Stambaugh
866c58a6d6
Eeschema: do not change schematic UUID on file overwrite.
2021-04-06 15:42:22 -04:00
Wayne Stambaugh
df186a2049
Eeschema: fix root sheet UUID changing in project file.
...
This change is a bit more invasive than the description above would
suggest. UUIDs have been added to all schematics. For now, it's only
useful to the root schematic so that the UUID in the project file does
not change every time the project file is save. In the future, it may
be useful to store and check the schematic UUIDs against the one's saved
in the project file.
Fixes https://gitlab.com/kicad/code/kicad/issues/7763
2021-04-06 14:28:01 -04:00
Jeff Young
daaf738c7f
Add save-as files to file history.
...
Also fixes where lock wasn't getting reset on a Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/8111
2021-04-06 13:35:26 +01:00
Roberto Fernandez Bautista
d041578150
CADSTAR Schematic: Fix import of text alignment
...
Ensure that the text alignment applied to text objects corresponds to
valid text alignments that can be set within eeschema
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8090
2021-04-05 20:15:08 +01:00
Roberto Fernandez Bautista
7d9ee76f64
Don't iterate through m_selection if deleting items from it
...
Use the copied container saved_selection instead
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8126
2021-04-05 18:40:40 +00:00
Jonathan Haas
baca70e748
Fix description: FETs have a gate, not a grid
2021-04-05 16:15:25 +02:00
Ian McInerney
e08387ce3d
Make the GAL responsible for the native cursor management
...
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2021-04-05 02:36:12 +01:00
Marcus A. Romer
1632707d9b
Replace tabs with spaces
2021-04-05 01:13:39 +00:00
Jeff Young
329577cc5c
Add new text items/labels to the selection so rotate/mirror/etc. work.
...
Also clears the selection after finding the sheet in the sheet pin
case so that the sheet itself doesn't get rotated/mirrored/etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/8108
2021-04-03 19:41:24 +01:00
jean-pierre charras
2b89511887
DIALOG_LIB_EDIT_TEXT: Remove useless code creating a wxWidgets alert. Fixes #8093 https://gitlab.com/kicad/code/kicad/issues/8093
2021-04-03 17:58:11 +02:00
Carsten Schoenert
cb17c9f3dd
Typo fix: Correct various misspelled words
...
agressive -> aggressive
decription -> description
miscellanous-> miscellaneous
rectange -> rectangle
Unkown -> Unknown
2021-04-03 13:39:50 +00:00
Jeff Young
32e8a17cc0
Fix nullptr error.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8102
2021-04-03 11:15:11 +01:00
Jon Evans
358f01ba66
Use HTML report window for symbol loading issues
2021-04-02 19:50:50 -04:00
Jon Evans
c1573744be
Lock project files when opening; open locked projects read-only
...
Also clean up an include-what-you-use problem
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8037
2021-04-02 19:29:56 -04:00
Ian McInerney
bb95761642
Remove unused variable
...
item is already an SCH_ITEM, so the static cast is pointless.
2021-04-02 19:26:22 +01:00
Jeff Young
ebfbe14185
Persist fields_autoplaced information.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8086
2021-04-02 17:08:58 +01:00
Jeff Young
c7d689a022
Show field children when creating new labels.
...
And in particular, show reasonable intersheet reference facsimiles.
2021-04-02 15:15:07 +01:00
Jeff Young
04f7fbfa4a
Don't draw selection in hyperlink colour.
2021-04-02 11:18:18 +01:00
jean-pierre charras
dce351791c
Eeschema, DIALOG_SYMBOL_PROPERTIES_BASE: very minor fix: make lib link copiable.
...
Fixes #8080
https://gitlab.com/kicad/code/kicad/issues/8080
2021-04-01 13:54:32 +02:00
Jeff Young
0c4184f1a4
Split lib tree initialization into a two-pass affair.
...
This is under the supposition that we can't set the column widths
on some Mac instances because the host controls haven't yet been
created. This is primarily conjecture based on looking at things
that have the *possibility* of going wrong. Why this only happens
in some installs is beyond me.
Fixes https://gitlab.com/kicad/code/kicad/issues/5479
2021-04-01 10:51:29 +01:00
jean-pierre charras
655a696589
fix compil issue
2021-04-01 11:36:30 +02:00
jean-pierre charras
6499b5f296
Eeschema: protect lib symbols against duplicate field names.
...
If a field name is already in use, try to rename the new field name
(adding the suffix "_1" or "_2" or ... )
This is especially critical when a non mandatory field has the same name as
a mandatory field (was crashing before)
Fixes #8081
https://gitlab.com/kicad/code/kicad/issues/8081
2021-04-01 11:27:14 +02:00
Jeff Young
2ad69fc56b
Move importers from wxLog to REPORTER.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6389
2021-03-31 22:54:30 +01:00
Ian McInerney
0a0935e0f3
Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
...
After commit 9535153f9e
there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00:00
Roberto Fernandez Bautista
de1191f971
Only FixupJunctions for Legacy designs
...
The new s-expression format embeds the library within the file
so there should be no connectivity issues (unless they were present
in the original design).
This fixes a potential issue with EAGLE imported schematics.
2021-03-30 13:03:56 +00:00
Roberto Fernandez Bautista
c5e4220b5b
CADSTAR Schematic: Fix duplicate pins
...
Fixes a bug that was causing duplicate pins to be loaded
(one on top of the other) for all symbols.
2021-03-30 13:03:56 +00:00
Roberto Fernandez Bautista
767aab7294
CADSTAR Schematic: Fix up junctions after load
2021-03-30 13:03:56 +00:00
Roberto Fernandez Bautista
1629b038e1
CADSTAR Schematic: Fix loading of symbol instances differing from part
...
The previous assumption was that a part definition would always hold
the information about the symbol. However some designs have symbol
instances that refer to a different symbol definition than that
specified in the part.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7808
2021-03-30 13:03:56 +00:00
Roberto Fernandez Bautista
e6c7ddc271
CADSTAR Schematic: Fix loading of symbol attributes
...
Fixes an issue that resulted in incorrect field values being loaded
2021-03-30 13:03:56 +00:00
Roberto Fernandez Bautista
51db9cfcef
CADSTAR Schematic: Text Loading improvements
2021-03-30 13:03:56 +00:00
Jeff Young
2fc34de1be
Don't nag the user about file extensions. Just fix it.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8067
2021-03-29 22:11:35 +01:00
Jeff Young
f2e68e68d0
Add "Hide Tree" context menu options when tree has no selection.
...
Also cleans up some other code to be more consistent between symbol
editor and footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/8052
2021-03-29 12:02:00 +01:00
Jeff Young
14e73d24dc
Naming conventions.
2021-03-29 11:46:05 +01:00
Jeff Young
455e7dc3a8
Reorder for better readability and consistency.
2021-03-29 11:04:06 +01:00
Jeff Young
1b163c5dd3
Don't eat delete event when there's no item being drawn.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8061
2021-03-29 10:59:45 +01:00
Jeff Young
0561ce903e
Don't remove IS_MOVED flag too early.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8056
2021-03-28 20:05:41 +01:00
Jeff Young
c32932a311
Naming conventions.
2021-03-28 20:05:41 +01:00
jean-pierre charras
cc43436df8
Eeschema: Fix a few issues in dialog edit fields
...
Partial fix of #8057
2021-03-28 18:23:35 +02:00
Ian McInerney
42c6af4bd8
Cleanup ACTION_MENU creation in some places
...
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
2021-03-27 19:16:58 +00:00
Ian McInerney
7bfa8575fa
Remove redundant information from import/export menu item labels
...
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.
Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
2021-03-27 18:50:35 +00:00
Jeff Young
15e640b5fe
Reset field ids after re-ordering.
...
We use the id for sorting the multivector.
Fixes https://gitlab.com/kicad/code/kicad/issues/8031
2021-03-26 23:26:10 +00:00
Jeff Young
a0a5e93782
Remove m_props from symbol library plugins. It's not thread-safe.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8035
2021-03-26 21:57:32 +00:00
Jeff Young
3d6c05b210
Apply symbol field id fixup logic to lib parts.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7903
2021-03-26 21:57:32 +00:00
Wayne Stambaugh
925b6d9387
Eeschema header housekeeping round 2.
2021-03-25 17:55:16 -04:00
Roberto Fernandez Bautista
e0d2724f68
CADSTAR Schematic: Increase "tiny" bus labels to 0.4mm text size
...
Also fix incorrect label orientation
2021-03-25 19:10:49 +00:00
Roberto Fernandez Bautista
6494e0bf25
CADSTAR Schematic: Fix orientation of net labels and sheet pins
2021-03-25 17:50:33 +00:00
Roberto Fernandez Bautista
5a74fb9bb1
CADSTAR Schematic: Ensure connectivity with tiny labels at Bus Entries
...
Always add a label at bus terminals to ensure connectivity. The original
design might already have a bus terminal with a given location.
If the original design does not have a label, just make it very small
to keep connectivity but make the design look visually similar to
the original.
2021-03-25 17:50:33 +00:00
Wayne Stambaugh
a85898f904
Eeschema header housekeeping round 1.
2021-03-25 10:08:06 -04:00
jean-pierre charras
faa5ed3e37
typo
2021-03-25 11:47:13 +01:00
Jeff Young
040cdd64f2
Fix typo in Eeschema titlebar.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8016
2021-03-25 10:28:03 +00:00
jean-pierre charras
bbd7b4ca8c
Eeschema, selection tool: uniformize the cursor shape and the actual modifiers.
...
SHIFT, CTRL, ALT modifier keys were handled in 2 different codes, one for
the selection tool and another to modify the mouse cursor shape, with 2
different configs.
Now the modifiers are managed from only one function.
Pcbnew: group also SHIFT, CTRL, ALT modifier keys management to a specific function.
Fixes #8021
https://gitlab.com/kicad/code/kicad/issues/8021
2021-03-25 10:28:20 +01:00
Wayne Stambaugh
b37b7d53b4
Fix geographic annotation bug when back annotating to schematic.
...
For some reason, the footprint UUID was being prefixed to the sheet path
which caused the symbol look up by sheet path to fail. An option was
added to not do this when the geographical back annotation to the schematic
is performed.
2021-03-24 09:57:36 -04:00
Jon Evans
4dbeb15024
Use a worker thread to send socket commands
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6503
2021-03-23 03:20:40 +00:00
Roberto Fernandez Bautista
be51be22a7
Update Page Number when Duplicating or Pasting sheets
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7872
Also, update hierarchy before renaming pasted sheets
Avoids duplicate sheet names when pasting multiple sheets
2021-03-23 02:48:07 +00:00
Wayne Stambaugh
c7d2440699
Eeschema: fix build issue when spice simulator build is disabled.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7996
2021-03-22 17:45:49 -04:00
Jeff Young
29b215d7f5
Move spice compatibility mode out of analysis type notebook.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7988
2021-03-22 13:51:10 +00:00
Jeff Young
cf4cbea8a1
Use a more robust storage of items added to drag.
...
We kept having various issues of the pointer list going stale. This
will prevent all permutations of that.
Also while I was in there I fixed the double-move thing (see bug
number).
Fixes https://gitlab.com/kicad/code/kicad/issues/7910
2021-03-22 13:51:10 +00:00
Wayne Stambaugh
cfaca0e4bb
Revert "Eeschema: remove all legacy schematic and symbol library save code."
...
This reverts commit 9c19c2306e
.
Unfortunately writing legacy symbols libraries can never be removed because
of the symbol rescue feature. :(
Fixes https://gitlab.com/kicad/code/kicad/issues/7986
2021-03-22 08:19:47 -04:00
Wayne Stambaugh
664b0c597a
Schematic netlist exporter header housekeeping.
2021-03-22 07:59:54 -04:00
Jon Evans
c5c348538e
Fix some STL asserts in EE_SELECTION_TOOL
2021-03-21 22:01:45 -04:00
Jon Evans
f7c20c6bef
Only consider pins on this unit as clickable anchors
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7987
2021-03-21 19:18:13 -04:00
Roberto Fernandez Bautista
8efc2f12d8
Non-KiCad Schematic Importers: Do not save project
...
Prevents creating unnecessary project files when importing
Non KiCad schematics.
Also clarified that empty.kicad_wks is required for all importers
(not just EAGLE).
2021-03-21 20:13:20 +00:00
Roberto Fernandez Bautista
6c29f54988
Non-KiCad Schematic Importers: New project when running standalone
...
Create a new project when running eeschema standalone and importing
a non-KiCad Project.
If we have the project manager open, then we instead use the existing
project and load everything there.
2021-03-21 20:13:20 +00:00
Roberto Fernandez Bautista
a0889705e7
EAGLE and Altium SCH importers: UpdateSymbolLinks after import
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7687
2021-03-21 20:13:20 +00:00
Wayne Stambaugh
6997fec14f
Schematic editor dialog source code housekeeping.
2021-03-21 13:31:23 -04:00
Jon Evans
9b0d7b7d37
Maybe make Coverity happy
2021-03-21 09:19:18 -04:00
Thomas Pointhuber
d9229697d8
altium: special string override map should be case-insensitive
...
This only fixes overrides where we explicitly map an override. Wrongly written variables pointing to fields are not corrected by this.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
2021-03-20 20:42:25 +01:00
Wayne Stambaugh
9c19c2306e
Eeschema: remove all legacy schematic and symbol library save code.
...
Legacy schematic and symbol library saving is officially deprecated.
2021-03-20 13:29:44 -04:00
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
2021-03-20 12:09:18 -04:00
Wayne Stambaugh
80cb1db2e6
Spice simulator settings dialog improvements.
...
The dialog can now be closed even if it is not on a simulation type tab
which is an improvement but it still doesn't flow very well. Maybe a
drop down list control to select the desired simulation type would make
for a better user experience.
2021-03-20 11:19:40 -04:00
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