Ignore bus member connection subgraphs. They do not have a valid net
name nor do they contain schematic items. This prevents empty nodes
from being added to the tree. They can be reintroduced in the future
if someone wants to pursue it.
Freeze the wxTreeCtrl while populating it and thaw when done to prevent
any unnecessary repainting.
Add profiling to test how long it takes to rebuild the net navigator.
The recently added populate the navigator with all nets when no net
is highlighted has exposed some potential performances issues with some
versions of wxWidgets on certain platforms. Namely wxWidgets 3.2.4 on
Linux GTK.
Fix an issue where a sheet name change would not update the highlighted
net navigator resulting in a stale human readable sheet path.
Prevent the highlighted net navigator from being rebuilt twice when
loading a schematic. SCH_EDIT_FRAME::RefreshNetNavigator() was being
called from both SCH_EDIT_FRAME::UpdateHierarchyNavigator() and
SCH_EDIT_FRAME::RecalculateConnectivity().
Add a new trace helper "KICAD_UI_PROFILE" to show trace output when
profiling user interface performance. It's used in the net navigator
profiling mentioned above.
Reuse PROF_TIMER::Show() to generate string for PROF_TIMER::to_string().
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic. This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic. This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues. This bug does not apply when opening
the full project.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11076
These settings objects could be created in a constructor/destructor
so we should catch the exception since those are noexcept.
Also change the settings trace to match the other kicad traces
as KICAD_SETTINGS
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.
Also, improve the environment variable tracing infrastructure to capture
more changes.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects. It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic). This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet. This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references. It also allows the root schematic from one project
to be uses as a sub-sheet in another project.
When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs. This is done to ensure there
are no sheet path instance clashes between projects. That being said,
there are no checks for this. It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.
CHANGED: Window position on startup should be preserved more
Force the symbol library links whenever the symbol library table has been
modified. This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.
Fix the SCH_COMPONENT symbol resolver when falling back to the cache. The
resolver was using the LIB_ID ':' notation which was failing. Replacing
':' with '_' fixed this issue. This was also an issue when generating the
symbol message panel information.
Convert wxLogDebug to wxLogTrace in symbol resolver code path. Add new
trace type KICAD_SYM_RESOLVE.
Fixes lp:1821606
https://bugs.launchpad.net/kicad/+bug/1821606
This is done to avoid a big chunk of conditionally-compiled code
in the middle of the event function.
Also separates the zoom logic from the WX_VIEW_CONTROLS object
and isolates it in a separate class behind a clearer interface.
Add some simple tests for sane steps on GTK+3-sized scroll
steps.
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.
Add new trace flags for locale and screen object tracing.
The usual smattering of code policy fixes.