Commit Graph

307 Commits

Author SHA1 Message Date
Jeff Young 7fc04c3cf2 Fixes for realtime connectivity being off.
Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-24 13:20:44 +00:00
Jeff Young 696f7c47fb Reduce use of auto. 2021-11-24 13:20:44 +00:00
Jeff Young 996a5b85a6 Overhaul IsJunctionNeeded logic to support all the different cases.
Several clients were using this with different needs.  The API is
now more explicit (and there are more options under the hood).

Fixes https://gitlab.com/kicad/code/kicad/issues/9518
2021-11-04 12:57:16 +00:00
Jeff Young f345eacf13 Be more careful with undo, and don't re-merge a bus over a bus entry.
Fixes https://gitlab.com/kicad/code/kicad/issues/9475
2021-10-30 19:58:09 +01:00
Jeff Young 1fa9ad227a Repair new junction logic for crossing wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/9484
2021-10-29 19:09:02 +01:00
Wayne Stambaugh c61af21da8 Eeschema: don't stat files when updating title bar text.
The tests for file existence and write status perform two file stats
which cause performance issues on slow network shares.  Now the file
state is determined at load time and stored in the SCH_SCREEN object
so file access is no longer required.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9343
2021-10-14 10:52:58 -04:00
Jeff Young 7901d705ba Fix optimization to not fetch all possible endpoints for non-connectable. 2021-09-24 20:08:42 +01:00
Jeff Young a4f83073e3 Use RTree to optimize searches.
Should produce an order of magnitude speedup on dangling end tests
in some documents.
2021-09-24 12:42:22 +01:00
jean-pierre charras fada53d90c Fix SCH_SCREENS::HasNoFullyDefinedLibIds(): incorrectly returned true if no symbol found.
Fixes #9195
https://gitlab.com/kicad/code/kicad/issues/9195
2021-09-20 18:29:26 +02:00
Wayne Stambaugh 451f8eefc0 Eeschema: fix broken project symbol rescue bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9111
2021-09-09 10:21:09 -04:00
Seth Hillbrand 09be1a8c78 Ensure sheets are deterministically sorted
Even if a sheet exists at the same x/y coordinate as another, the sort
needs to ensure a deterministic ordering
2021-08-20 08:31:01 -07:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh 04c6b79350 Eeschema: remove unused and unnecessary code.
When swapping SCH_SYMBOL objects during undo, no special processing is
required.  The SCH_PIN objects are updated when the LIB_SYMBOL objects
are swapped and the call to SCH_SCREEN::SwapSymbolLinks() didn't do
anything.
2021-08-11 14:30:29 -04:00
Wayne Stambaugh f485ba9338 Fix netlist error when editing schematic symbols in place.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8798
2021-07-30 18:37:45 -04:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young 726f4d8016 Fix up some more cases of missing escaping for symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 16:40:38 +01:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
Jeff Young 5a57f6ba98 Clear NEW flags after import.
Fixes https://gitlab.com/kicad/code/kicad/issues/8750
2021-07-07 20:05:50 +01:00
Jeff Young 66eb2ddeb5 Remove auto when not needed for line length. 2021-07-07 20:05:50 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko fcb21038cb Reduce some eda_item.h usage in headers 2021-06-06 11:09:06 -04:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Wayne Stambaugh 9fcd847238 Eeschema: allow sheet file paths outside the project to be relative. 2021-05-27 14:48:22 -04:00
Wayne Stambaugh 2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -04:00
Ian McInerney 6c3cf33170 Cleanup some compiler warnings 2021-03-19 21:18:45 +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
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
Wayne Stambaugh fb29b4f946 Eeschema: add missing symbol cache library file warning.
Fixes https://gitlab.com/kicad/code/kicad/issues/7346
2021-03-10 09:52:53 -05:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08: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
Seth Hillbrand f73039cb18 Fix wire endings both too small and too large
Junctions should only be wire endings when ending directly on the wire.
This is the requirement for netlisting, so we need to follow it in the
auto-end as well.

SCH_LABEL needs to allow ending because any wire that touches the label
will be connected, so there's a use case for this.  However, the
bounding box for local labels did not include their connection point, so
we increase that box a bit.  Note that this might have the opposite
effect to https://gitlab.com/kicad/code/kicad/-/issues/7689

Fixes https://gitlab.com/kicad/code/kicad/issues/7714
2021-02-25 16:27:05 -08:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
Jeff Young 7e2b0e63f1 Fix junction logic when splitting two wires. 2021-02-23 21:43:41 +00:00
Jeff Young d70cebcd62 Allow clicking on terminal point to finish a bus unfold.
Fixes https://gitlab.com/kicad/code/kicad/issues/7413
2021-02-07 00:31:00 +00:00
Jeff Young 1c6c0bf8cf Null-ptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/7266
2021-02-02 23:09:35 +00:00
Jeff Young bbb8173b61 Remove and re-add saved-as libraries when Syncing tree.
Also removes the aForce parameter as it was always true anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7357
2021-01-31 23:00:17 +00:00
Jeff Young dfc6070178 Unify schematic file version checking with PCBNew.
This also makes sure that the user gets a warning before saving over
an older s-expr format.  While that won't always be wanted, it's now
in the infobar (like in PCBNew), so it's not too onerous.§

Fixes https://gitlab.com/kicad/code/kicad/issues/7347
2021-01-31 17:28:14 +00:00
Mikolaj Wielgus 8eca23aabe Mark null project initial screen as zoom-initialized
The variable `m_Initialized` in `BASE_SCREEN` is used by
`SCH_EDIT_FRAME` to mark whether a screen had its zoom level initialized
by the "zoom to fit screen" action. When this variable is `false`, the
function `SCH_EDIT_FRAME::DisplayCurrentSheet()` performs "zoom to fit
screen", modifying the zoom level. This function is indirectly called in
the undo routines, so if `m_Initialized` is not set to `true`, a zoom
change will occur when the user undoes an operation, a behavior that is
undesired.

`m_Initialized` was not initialized to `true` for the null schematic
(the schematic that is loaded if no project is loaded), causing the
aforementioned undesired behavior.

To prevent this, I've changed the `SCH_EDIT_FRAME` constructor to set
`m_Initialized` to `true`, since it zooms to fit screen already. I've
moved `m_Initialized` from `BASE_SCREEN` to `SCH_SCREEN`, as it is used
only in Eeschema, and renamed it to `m_zoomInitialized`, a name I
believe that better describes what this variable does.

I've also introduced the function `SCH_EDIT_FRAME::initScreenZoom()` to
group the "zoom to fit screen" action with setting `m_Initialized` to
`true`, as they often should occur together.

I'd also like to say that I'm not confident whether
`SCH_EDIT_FRAME::DisplayCurrentSheet()` should perform the zoom level
initialization at this point, but I have decided to not change this
behavior for now, as the commit history suggests it's several years old.

Fixes https://gitlab.com/kicad/code/kicad/issues/7343
2021-01-31 00:49:11 +00:00
Jeff Young ff7742c6b8 File naming and include cleanup. 2021-01-28 11:35:18 +00:00
jean-pierre charras e10025db64 Hierarchy navigation: keep the last used zoom level in a sheet when go back to this sheet.
Fixes #7107
https://gitlab.com/kicad/code/kicad/issues/7107
2021-01-17 09:41:49 +01:00
Dominik Wernberger dc02ec9758 Remove a few const_cast 2021-01-12 20:51:31 +00:00
Dominik Wernberger bb2881a5ab Make RENDER_SETTINGS argument const 2021-01-12 20:51:31 +00:00
jean-pierre charras e66451c56e I18n: remove useless trailing spaces in strings. 2020-12-28 08:43:47 +01:00