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
- update hierarchy navigator after any modifications to the SCH_EDIT_FRAME
- do not generate ghost selection events after updating hierarchy tree
- use Human Readable path in SCH_EDIT_TOOL::EditPageNumber
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5760
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of. Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
Also fixes a bug where we were depending on the old deque stuff's
deterministic traversal, which isn't provided by the new RTree stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/2433
This moves EESchema DLIST structures to rtree. These changes are more
fundamental than the pcbnew changes from 9163ac543888c01d11d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
and switch to the paren sheet from the context menu.
Mainly, change the way the dialog is managed from the sch_edit_frame:
the pointer to find the created dialog is replaced by a call to wxWidows::FindWindowByName().
Using a pointer set and cleared by events is a recipe for crashes.
ADD: User can now decide to keep the hierarchy navigator open while working
on a schematic.
This behavior can be configured in eeschema->preferences->eeschema->Editing options.
When, inside a complex hierarchy, one switch from an instance of a sheet to an other instance of this sheet,
the page number shown in the worksheet was not updated on screen, and the initial number was displayed.
Fixes: lp:1827981
https://bugs.launchpad.net/kicad/+bug/1827981
Bus upgrades: core new connectivity code
Bus upgrades: eeschema integration and modifications
Bus upgrades: eeschema dialogs
Bus upgrades: netlist export
Bus upgrades: file format changes
Derive the dialog from DIALOG_SHIM and show dialog quasi-modally to prevent
other KiCad main frame window events from being blocked.
Remove redundant storing of parent window pointer.
Verify parent window pointer is actually a SCH_EDIT_FRAME since the dialog
directly accesses parent object methods.
Replace static event table with dynamic event handling.
Fixes lp:1718241
https://bugs.launchpad.net/kicad/+bug/1718241
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h
Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.
This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.
The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.
Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
* Derive SCH_SHEET_PATH from std::vector< SCH_SHEET* > and remove unnecessary
assignment operator and list management functions.
* Remove function BuildSheetPathInfoFromSheetPathValue() since it was
effectively an assignment operation.
* Replace all calls to BuildSheetPathInfoFromSheetPathValue() with assignment
operator.
* Replace list management functions with vector management functions.
* Fix a error message that wasn't translatable.
* Remove wxDC and EDA_DRAW_FRAME parameters from SCH_SCREEN::SchematicCleanUp()
function call.
* Update all code that calls SCH_SCREEN::SchematicCleanUp() with wxDC and/or EDA_DRAW_FRAME
parameters.
* Fix a display refresh bug when incrementally inserting bus entries created in my last commit.
IsDanglingStateChanged() appears to be broke for bus entries.