Commit Graph

1512 Commits

Author SHA1 Message Date
Jeff Young 90c14ecdf7 Upgrade a couple of schematic actions to SCHEMATIC_COMMIT. 2023-06-07 15:30:56 +01:00
Seth Hillbrand c33d1ab244 Don't dirty the item connectivity prematurely
Item connectivity changes once the elements are commited, not during the
process of moving.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14884
2023-06-05 09:12:20 -07:00
Jeff Young d827bb8a1f Leave back/forward/up nav buttons enabled so the action doesn't change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14783
2023-05-31 11:13:35 +01: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
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 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
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 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
Wayne Stambaugh 24b04795fd Add net navigator panel to schematic editor.
[ADDED]: A panel to the schematic editor  that allows quick access to all
         of the items connected to the currently highlighted net.

This is an initial swag at implementing a full net navigator feature.  For
now it only shows the currently highlighted net nodes.  The incremental
net list advanced setting must be enabled in order to use this feature due
to performance reasons.  There are still some issues with saving the panel
position which will be addressed in the future.

Initial code for serializing wxAuiPaneInfo settings to and from JSON have
be implemented.
2023-05-20 13:48:03 -04:00
Marek Roszko aeadd49a33 Fix windows builder broken by 831a6d5 2023-05-16 21:49:55 -04:00
Wayne Stambaugh 831a6d55fc Fix potential stale pointer bug in schematic highlight connection code.
SCH_CONNECTION objects are temporary and can become stale any time the
connectivity is updated.  Keeping them around to reference later is a
bad idea.  Even if the object pointer is still valid in an SCH_ITEM in
the undo/redo buffers, comparing the pointer against another pointer as
a test to see if they are the same connection is not valid.  Saving the
connection name is safe and ensures the connection is the same even if
the pointers differ.
2023-05-16 20:06:21 -04:00
Marek Roszko 1adcb86e0b Initial schematic search pane 2023-05-14 22:41:56 -04:00
Jeff Young 4a62cc6edd Separate symbol editor polyline and polygon tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/14695
2023-05-07 14:58:44 +01:00
Jeff Young 49655ae742 Defense in depth for "mouse stuck in canvas".
Fixes https://gitlab.com/kicad/code/kicad/issues/12653
2023-05-06 11:28:14 +01:00
Jeff Young c016bea020 Make sure mouse isn't captured when dialog is raised.
Fixes https://gitlab.com/kicad/code/kicad/issues/14685
2023-05-06 11:28:14 +01:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Seth Hillbrand 1e03c84918 Add ability to toggle attributes
Adds actions and context menu options to adjust attributes.
2023-05-04 11:51:21 -07:00
Seth Hillbrand cb85412b85 Cleanup Undo ordering
The undo command has accreted a number of things over the years.  This
prunes back the changes to the minimum required number and correctly
orders the actions

Fixes https://gitlab.com/kicad/code/kicad/issues/14661
2023-05-01 19:29:48 -07:00
Mike Williams 04a53ea40d Picker Tools: make sure we know what tool we are
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14621
2023-05-01 12:43:09 -04:00
Mike Williams 39cc686dc4 Back Annotation: add support for DNP and Exclude from BOM attributes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14584
2023-05-01 08:54:14 -04:00
Seth Hillbrand f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Jeff Young e1b39946fe ADDED: show/hide controls for directive labels. 2023-04-28 00:32:49 +01:00
Jeff Young f7a552a2b3 Ensure item is gridded if there was no motion between clicks. 2023-04-18 23:55:56 +01:00
Jeff Young 6fb8916798 The symbol viewer handles its own message panel. 2023-04-16 18:47:04 +01:00
aris-kimi 18cebe3779 Don't assume an EDA_ITEM is a SCH_ITEM. v2
In the same way as cec4109176 did

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14528
2023-04-13 11:12:02 +01:00
Jeff Young a24a63e416 Search in label fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/14075
2023-04-12 23:21:53 +01:00
Ian McInerney 18e573d5e9 Remove stray wx include
There is no reason to include the actual string implementation header
here.
2023-04-12 18:57:12 +01:00
Jeff Young 66f48d56ae Separate sheet reloads (MODEL_RELOAD) and schematic reloads (SUPERMODEL_RELOAD).
Fixes https://gitlab.com/kicad/code/kicad/issues/14523
2023-04-12 11:51:09 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
jean-pierre charras f01e083f7c fix 2 issues related to SCH_GLOBALLABEL items:
- Ensure the first field in m_fields has id = 0 to be seen has hypertext
(it was not the case after reading a .kicad_sch file)
- when converting this item to another label/text, remove this special Field
from the copied field list to the converted label.
2023-04-10 09:58:27 +02:00
Jeff Young a226f7fc14 Don't delete default intersheetrefs field from global labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/14493
2023-04-09 19:03:36 +01:00
jean-pierre charras 7eb13c3d33 Symbol editor: clear the edit flags of a pasted pin after place it.
When pasting a single pin, its edit flags were not cleared, and create
issues when trying to edit the pasted pin.
Fixes #14188
https://gitlab.com/kicad/code/kicad/issues/14188
2023-04-06 11:08:01 +02:00
Jeff Young a9b2234f4e Use a softer Reset for grid settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/14458
2023-04-04 17:05:21 +01:00
Jeff Young 3a8d6dffba Don't close ERC window when changing sheets.
This Reset() override was originally added to fix a bug when opening
a new schematic in stand-alone.  However, we now do that sort of
cleanup in SCH_EDIT_FRAME::doCloseWindow().

Fixes https://gitlab.com/kicad/code/kicad/issues/14470
2023-04-02 11:48:23 +01:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Ian McInerney 016c958021 Always build spice simulator support
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
2023-03-20 16:54:32 +00:00
jean-pierre charras 5bd491bd74 Avoid schematic editor frame to go on top when selecting a symbol.
It was s side effect of a CrossProbe called on a symbol selection.
This also replace commit e51594cdf5.
Fixes #14316
https://gitlab.com/kicad/code/kicad/issues/14316
2023-03-17 16:37:49 +01:00
Jeff Young 6d296038f3 Improve simulation error reporting.
1) More REPORTER, less exception processing
2) Remove UI calls from SPICE_MODEL
3) Don't replace netlist with errors; show both
4) Don't bail out of netlist generation after single error

Fixes https://gitlab.com/kicad/code/kicad/issues/14295
2023-03-16 16:12:29 +00:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
Jeff Young 74f064d3aa Don't keep smart pointers to wxWindows, particularly modeless ones.
wxWindows have their own lifecycle management.
2023-03-11 19:36:01 +00:00
Jeff Young 9546a40662 Correct usage of elipses after menu items.
(They should only be used when we collect more info before performing
the command.  If the command is something like showing the simulator,
then there should be no elipsis as we don't collect more info before
showing the window.)

Also improves a few of the menu tooltips.
2023-03-10 21:33:06 +00:00
Jeff Young bc0d59801a Graphical diff for schematic vs library symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-09 18:04:52 +00:00
Jeff Young 2d6ab62da4 ADDED: schematic/library diff for symbols. 2023-03-09 18:04:52 +00:00
Jeff Young 98d7b14dbc A better solution to keep SPICE netlist from being entirely selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/14177
2023-03-06 18:46:01 +00:00
Wayne Stambaugh a1fb8e1b1d Coverity fixes and code cleaning. 2023-03-06 07:12:18 -05:00
Alex d2bd7e33b9 Remove extra canvas redraws when changing sheets. 2023-03-05 04:33:07 +03:00
Jon Evans 610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Jeff Young b6d0b65261 Naming conventions and commenting. No functional changes. 2023-03-04 00:10:01 +00:00