Add m_hasPendingItemUpdates to VIEW so UpdateItems() can
return immediately when no item has queued update flags.
The flag is set wherever m_requiredUpdate is modified and
cleared at the end of UpdateItems().
In DoRePaint(), check the new flag alongside IsDirty() and
cursor movement to skip both item processing and the GL
draw cycle when nothing has changed. Route onPaint through
Refresh() so the existing frame-rate throttle applies to
native paint events as well.
Replace wxCHECK_MSG assertion with a graceful early return and trace
log. Items can end up associated with a different view during teardown
or when moved between views, which is not a fatal error.
Fixes KICAD-72D
VIEW::Clear() will set the view to nullptr. When we then remove the
items afterward, we still want to allow full removal as long as we know
the view is ours or has been released by Clear()
VIEW::Clear() did not invalidate the viewPrivData for items before clearing
internal data structures. When a selection tool's Reset() added its m_selection
VIEW_GROUP to the view before Clear() was called, the m_selection retained a
stale m_viewPrivData->m_view pointer after clearing. Then, when reloading files
the selection tool tried to remove and re-add m_selection, leaving a stale reference
The fix invalidates viewPrivData->m_view for all items before clearing,
ensuring persistent items like selection groups won't have dangling references.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22755
We don't need a full repaint for items when selected, just update
colors. Selected mode doesn't require hiding the existing items, we
just need to repaint them in a new color. Then we can use the cached
elements
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22591
ViewGetLayers returns the item layer even if it is invalid. We filter
this out at the base and skip items that cannot be displayed in the
view.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21368
Saves a mishmash of local HIDE/SHOW defs along with various literals.
Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.
Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).