Commit Graph

7954 Commits

Author SHA1 Message Date
Jeff Young e77a71bf7a Fix typo found in code review. 2022-03-21 10:32:36 +00:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young 58c146a7c0 ADDED ki_description and ki_keywords to footprint properties.
Also a bunch of wxT().

Fixes https://gitlab.com/kicad/code/kicad/issues/7783
2022-03-19 23:16:56 +00:00
Jeff Young cc165129fd Special case undo for items with instance data.
Fixes https://gitlab.com/kicad/code/kicad/issues/11102
2022-03-19 19:37:01 +00:00
Jeff Young 63b5ad7df1 Fix some issues with global-label fields' bounding boxes. 2022-03-19 19:37:01 +00:00
jean-pierre charras 2bba277c5e Unit binder: fix hang and DIALOG_WIRE_BUS_PROPERTIES: fix uninitialized variable.
The hang can be Windows specific.
2022-03-19 10:22:41 +01:00
Jeff Young 7b82c2ba85 Preload eeschema find with selection when appropriate.
Fixes https://gitlab.com/kicad/code/kicad/issues/11148
2022-03-18 23:31:30 +00:00
Jeff Young 41c0009c51 Off-grid ERC warnings.
Fixes https://gitlab.com/kicad/code/kicad/issues/10379
2022-03-17 20:23:56 +00:00
jean-pierre charras 77c52ad5df Fix a compil warning (shadowed var). 2022-03-17 20:13:17 +01:00
Jeff Young 400cff994d Update value & footprint from clipboard whether keeping annotation or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11116
2022-03-17 18:19:13 +00:00
Seth Hillbrand deb7a0beff Avoid marking symbols that will not be processed
We want to shorting the processing time by marking symbols that have
already been processed.  But we must avoid marking symbols that will not
be processed due to their other flags

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

(cherry picked from commit 2208e0db16)
2022-03-17 10:10:56 -07:00
Jeff Young 05bca282f7 Re-entrancy blocker for line/wire/bus tool.
Also clear infobar messages after a cancelInteractive.

Fixes https://gitlab.com/kicad/code/kicad/issues/11155
2022-03-17 15:27:33 +00:00
Jeff Young e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young 1434988bf8 Formatting. 2022-03-16 14:56:32 +00:00
Wayne Stambaugh c16090cc42 Improve sheet schematic import from different project message.
https://gitlab.com/kicad/code/kicad/-/issues/11075
2022-03-15 18:16:56 -04:00
jean-pierre charras 1f5ec30566 Fix and issue about 180 deg arcs in symbols from "old" libraries.
Can be seen with lib version 20201005, not with latest version.
The fix is similar to commit 8a17fb8d, but for arcs defined by start, end, angles
(modify 180 deg arcs)
Fixes #11130
https://gitlab.com/kicad/code/kicad/issues/11130
2022-03-15 11:31:58 +01:00
jean-pierre charras 2cb719f0cf Fix crash in SCH_LABEL_BASE::IsType() when the item is not living in a schematic.
It happens for instance when copying the item from the clipboard.
Fixes #11128
https://gitlab.com/kicad/code/kicad/issues/11128
2022-03-14 09:23:16 +01:00
Jeff Young 38cde901b0 Don't use last-resolved caches for graphic lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/11127
2022-03-14 00:31:56 +00:00
Jeff Young ec44dfa60f Unescape value fields when pasting from legacy schematics.
Fixes https://gitlab.com/kicad/code/kicad/issues/11124
2022-03-13 22:17:44 +00:00
Seth Hillbrand d653484d72 Move connected_items from hash table to tree
This gains about 10% speed in heavily connected sheets

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

(cherry picked from commit 187aa1c171)
2022-03-11 16:58:38 -08:00
Seth Hillbrand 5b5c7d41b4 Break up buildConnectionGraph for debugging
Needed to find bottlenecks in fns, so break out individual sections of
the massive function for easier understanding.

buildItemSubgraphs (one section of the previous function) would build
millions of connections that were never used as stacked pins created X!
connections.  Also tested using sets instead of lists and keeping unique
lists to avoid flagging but none of these were as performant as using
flags to remember which items had already been processed.

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

(cherry picked from commit 17b1b68ac7)
2022-03-11 16:58:38 -08:00
Jeff Young 7ab4d67e94 Make sure line style comboboxes get a default entry.
Fixes https://gitlab.com/kicad/code/kicad/issues/11083
2022-03-11 23:19:16 +00:00
Wayne Stambaugh dd1dbb81f6 Improve shared schematic file churn heuristics.
The previous solution cleared all of the fields and force the unit setting
to unit one which would have less than desirable effects when reusing a
schematic in another project.  This solution forces all of the instance
settings to the first sheet instance of the current project to prevent file
change churn when changing shared sheets in the current project.

This will not prevent shared schematic file changes when the first sheet
instance data differs between projects.
2022-03-11 12:37:30 -05:00
Wayne Stambaugh bf5d585e24 Reduce shared schematic file change churn. 2022-03-11 00:32:34 +00:00
Jeff Young a9eb7a0e28 Make sure LIB_ID escape context allows for formatting constructs.
Also make sure that value field is updated from name changes when the
symbol is a power symbol (even if it's from the schematic instead of
the library).

Fixes https://gitlab.com/kicad/code/kicad/issues/11093
2022-03-10 13:46:42 +00:00
Seth Hillbrand 16a266301a Remove double-call of settings from Netlister
Double-calls are no longer needed when using settings.  They can
interfere depending on how the system executes the commands.

Removing keeps the last used plugin as the default, rather than the last
selected

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

(cherry picked from commit e8ef863861)
2022-03-09 17:12:41 -08:00
Seth Hillbrand fd59179cd2 Avoid implementation dependent on events
Adding a page in the ctor can generate events that change the default
page.  Instead, we set the default after all pages have been added,
avoiding the reset

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

(cherry picked from commit 5314ba6440)
2022-03-09 15:42:29 -08:00
Seth Hillbrand 6934bc124c Move temp save files to temporary directory
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.

wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails

Fixes https://gitlab.com/kicad/code/kicad/issues/10747
2022-03-07 20:13:28 -08:00
Seth Hillbrand c9fb95b888 Fix the order of evaluation in the arc printing
MapAngles will adjust by small amounts the angles t1 and t2.  This
adjustment will determine the CW/CCW drawing.  Therefore, the MapAngles
needs to be called explicitly before the Normalize180() call.
Left-to-Right evaluation is not a given for MSVC

Fixes https://gitlab.com/kicad/code/kicad/issues/11050
2022-03-07 16:43:13 -08:00
Jeff Young bf0f2aa4a8 Adjust bitmap text spacing a bit so it's closer to the stroke font.
This helps the text better match the highlighting when it gets small
enough that we switch to the bitmap font for performance.
2022-03-07 20:30:50 +00:00
Jeff Young 1f745b000d Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-03-07 20:30:50 +00:00
Jeff Young 39fa4e2065 Include textbox in movable objects.
Fixes https://gitlab.com/kicad/code/kicad/issues/11058
2022-03-07 10:33:59 +00:00
Jeff Young d3716b9956 Reentrancy block for symbol editor symbol properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/11060
2022-03-07 10:26:18 +00:00
Jeff Young 4923f02651 Reset GAL pen width between drawing text and border.
Fixes https://gitlab.com/kicad/code/kicad/issues/11059
2022-03-06 20:32:28 +00:00
Jeff Young 3969045009 Don't bitmap multi-line SCH_TEXT.
The linespacing isn't even close and multi-line text is also likely to
have longer lines which makes the X offset get way off too.
2022-03-06 20:17:56 +00:00
Jeff Young 6b3ed89248 Handle justified LIB_TEXT.
Fixes https://gitlab.com/kicad/code/kicad/issues/11052
2022-03-06 19:54:06 +00:00
Jeff Young 14304215b3 Copy m_private flag in LIB_TEXT's clone().
Fixes https://gitlab.com/kicad/code/kicad/issues/11051
2022-03-06 17:00:13 +00:00
Jeff Young c919817c18 Don't reserve space for private items when autoplacing. 2022-03-06 16:12:49 +00:00
jean-pierre charras dbfdd3fb56 Fix some Coverity warnings. 2022-03-06 09:48:33 +01:00
Seth Hillbrand 8fd87e1f04 Change connectivity item group from set to vector
Reserve space for new items to speed construction of connectivity graph

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

(cherry picked from commit 7aebc4b11f)
2022-03-05 13:04:11 -05:00
Seth Hillbrand cd7141fd10 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

Fixes https://gitlab.com/kicad/code/kicad/issues/10442
2022-03-04 15:20:31 -08:00
Seth Hillbrand 7ecc70a79d Duplicate from selected or current
When double-clicking to open a symbol, it is no longer selected in the
tree.  We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command

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

(cherry picked from commit 802d20c409)
2022-03-03 16:04:22 -08:00
Jeff Young c025b4c73d Save all stroke parameters of sch & lib shapes.
We were failing to save the line style, which caused ERC errors when
DEFAULT != SOLID.
2022-03-03 14:37:04 +00:00
Jeff Young 76535d8572 Make LIB_ITEM::COMPARE_FLAGS really a flags field, and add ERC.
Before they were 1/2 treated as flags and 1/2 treated as a mode enum.

The ERC flag relaxes constraints on data that is settable in the
schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/11018
2022-03-03 13:27:18 +00:00
jean-pierre charras a0d68b8426 SCH_DIRECTIVE_LABEL: add missing virtual SwapData.
Fixes #11027
https://gitlab.com/kicad/code/kicad/issues/11027
2022-03-03 10:27:17 +01:00
Jeff Young c5d85e0b7e Don't try to open cell editor on first focus.
It hasn't worked since we rejiggered the default grid selection mode
anyway, and for some reason it eats <esc> key events after the dialog
has been resized.

Fixes https://gitlab.com/kicad/code/kicad/issues/11015
2022-03-03 02:06:48 +00:00
Jeff Young fd4b4533b1 Remove some code that isn't used anymore. 2022-03-03 02:06:48 +00:00
Seth Hillbrand 548936bb22 Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)

(cherry picked from commit 79b6991d7b)
2022-03-02 16:33:28 -08:00
Seth Hillbrand 8c36ba3653 Explicitly give unit values
Removes the ability to hide symbol units in file formats.  This was
mostly the case for a while but there remained corner cases where we
left a default/hidden option

Fixes https://gitlab.com/kicad/code/kicad/issues/10888
2022-03-02 16:01:08 -08:00
Seth Hillbrand 984eb0fb40 Handle locally-coded file names for sheets
Windows can accidentally create forward slash-coded files.  This simply
converts them to the proper unix-coded value when set

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

(cherry picked from commit 429544c188)
2022-03-01 17:23:30 -08:00