Commit Graph

37890 Commits

Author SHA1 Message Date
Mike Williams 7f250870fe schematic: fix crash in search pane when hit list is empty
std::all_of also returns true for an empty set
2023-05-29 09:50:09 -04:00
Jeff Young 2612b49698 Fix erroneous wxEXPAND flags. 2023-05-29 14:23:31 +01:00
jean-pierre charras ef4dded915 PCB_TEXT::TransformTextToPolySet(): fix incorrect param when calling Inflate()
This incorrect value created hang when clicking on a pcb text.
2023-05-29 14:21:10 +02:00
Jeff Young a4f16423c8 Push reference and value special cases down into LIB_FIELD::compare().
Use COMPARE_FLAGS::EQUALITY and COMPARE_FLAGS::ERC when doing
library diffs.

Also fixes a few more cases where we weren't checking for -1 when
doing a fieldID < MANDATORY_FIELDS.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14830
2023-05-29 12:40:20 +01:00
Roberto Fernandez Bautista dfebe516c5 CADSTAR PCB: Fix memory leak 2023-05-28 23:56:43 +02:00
Roberto Fernandez Bautista 8493cc4c89 CADSTAR SCH LIB: Add plugin options + improve symbol caching 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista 688a61df63 Add options editor to symbol library table + cleanup unused options 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young d526362d31 No sheet path has to be interpreted as the current sheet.
There's currently waaaay too much stuff that depends on it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14834
2023-05-28 20:46:50 +01:00
Jeff Young 8820df2187 Fix missing "else".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14831
2023-05-28 19:49:19 +01:00
Jeff Young 570978fa7f Replace larger text bboxes now that we're not using them for knockouts. 2023-05-28 18:17:24 +01:00
Jeff Young c71cf21e2f Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01:00
Jeff Young dacf0b2b96 Account for changes to mimic 6.0 text positioning in bounding boxes.
This is only a partial fix as knockout text is still busted....
2023-05-27 23:41:43 +01:00
Jeff Young 6b0bff2f4f Formatting. 2023-05-27 22:46:02 +01:00
Jeff Young 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +01:00
Jeff Young b8986709bf Every time I search for SCH_TEXT* it doesn't work.... 2023-05-27 21:25:36 +01:00
Jeff Young 81d7428fd2 Don't call OnPageSettingsChanges on Undo/Redo.
It's incredibly expensive (multiple seconds on a document with
lots of text in an outline font).
2023-05-27 20:35:05 +01:00
Jeff Young 3ab9175553 Spread the error-bar move evenly around justified text. 2023-05-27 18:53:04 +01:00
Jeff Young f35a88ce0b Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
jean-pierre charras f2f014a27c Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is
used to enable/disable the DeMorgan option and tool in toolbar
Fixes #13739
https://gitlab.com/kicad/code/kicad/-/issues/13739
2023-05-27 10:13:43 +02:00
Jeff Young 4ed267394a Outline font performance improvements.
1) Don't fracture font glyphs when generating them; we're going
   to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
   It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14303
2023-05-27 01:35:40 +01:00
Jeff Young ff37ebe61a Improve appearance of stroked knockout text. 2023-05-26 19:53:38 +01:00
Jeff Young cb53a18ee3 Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
Jeff Young 768fbf5af2 Give up on trying to calculate text bounding boxes.
It results in too many hacks strewn through the code.  Just draw the
text and measure it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14803
2023-05-26 18:44:33 +01:00
Jeff Young 6e127829f8 Cleanup formating and includes. 2023-05-26 18:44:33 +01:00
jean-pierre charras 68464a1993 Simulator: add missing ngspice models.
Fixes #14813
https://gitlab.com/kicad/code/kicad/-/issues/14813
2023-05-26 14:46:51 +02:00
Jon Evans 942ee13cd1 PNS: Allow width-caused DRC violations at start of route
Also fix an issue where DRC violations introduced by the
width change action could be committed in walk/shove mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14805
2023-05-25 23:10:00 -04:00
Jon Evans fbe185b99b PNS debug tool: HiDPI and settings fixes 2023-05-25 21:53:38 -04:00
Jeff Young 50da4e483e Tailor inspector text properties for dimension objects. 2023-05-25 16:18:37 +01:00
Jeff Young 5114d3b8c3 Don't use GetValueFieldText from within text var resolution.
(It resets the recursion checker.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14815
2023-05-25 14:34:20 +01:00
Steve Bollinger 28b37ad020 Someone accidentally exchanged the x and y coordinates when flipping
components horizontally and vertically in
SCH_DRAWING_TOOLS::SingleClickPlace()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14725
2023-05-25 12:11:48 +00:00
Jeff Young 1282e00775 Fix (presumed) stale name in macOS KIPLATFORM::IO. 2023-05-25 11:26:09 +01:00
Jeff Young 05fef51d81 Push rendering portion of text cache generation down into CALLBACK_GAL. 2023-05-25 11:25:32 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young 5a9ed66cfd Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
jean-pierre charras ff072feeb4 Fix an annoying compil warning on msys2 2023-05-25 11:09:58 +02:00
Seth Hillbrand 39ab2ea41f Fix typo in MSW io.cpp 2023-05-24 19:23:32 -07:00
Seth Hillbrand 48ecd742eb Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Seth Hillbrand 122be418bb Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734
2023-05-24 13:51:54 -07:00
jean-pierre charras 76d66571e4 Pcbnew: fix crash when trying to save a board with a text with overbar and
using a non Kicad font
PCB_PLUGIN::formatRenderCache() was considering all shapes in cache are polygons,
but this is not true: some items can be stroke shapes.
Fixes #14804
https://gitlab.com/kicad/code/kicad/-/issues/14804
2023-05-24 18:21:50 +02:00
jean-pierre charras cd904dc2b9 pcb_calculator, panel_cable_size: commit missing changes. 2023-05-24 13:23:08 +02:00
jean-pierre charras ed6a56cb57 pcb_calculator, panel_cable_size.*: enhancement: allow setting current density.
Fixes #14802
https://gitlab.com/kicad/code/kicad/-/issues/14802
2023-05-24 13:17:25 +02:00
jean-pierre charras a3ac014e14 French translation update 2023-05-24 10:51:43 +02:00
jean-pierre charras ef89495420 pcb_calculator, panel_cable_size.*: code cleanup. No actual change. 2023-05-24 10:25:52 +02:00
Jeff Young 2ac3f4cc9e Undo strategy based on being in a footprint, not footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14799
2023-05-23 17:56:12 +01:00
Jeff Young 56853a6209 Change teardrop edge shape to a checkbox. 2023-05-23 17:45:26 +01:00
Jeff Young b442d769fd Don't allow collisions with self.
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE.  When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14795
2023-05-23 14:10:22 +01:00
jean-pierre charras 03e846d8ea Eeschema: fix block mirroring of fields attached to labels (all types)
Fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Similar to commit 898d88cc, but for block mirroring.
Fixes #14758
https://gitlab.com/kicad/code/kicad/-/issues/14758
2023-05-23 09:42:24 +02:00
qu1ck e86937ca2e Use SetLabelText in PANEL_PACKAGE 2023-05-22 19:01:31 +00:00