This change makes it so that we don't run the event loop inside
the commit. It's not clear this is an issue, but it seems safer
not to.
Fixes: lp:1852589
* https://bugs.launchpad.net/kicad/+bug/1852589
Set the IS_NEW flags so the POINT_EDITOR doesn't try an poke its head
in, and apply the EE_SELECTION_TOOL hack for mouse clicks leaking
through to the underlying tools.
Fixes: lp:1832911
* https://bugs.launchpad.net/kicad/+bug/1832911
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.
Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
Checks for ratsnest enabled prior to calculating and displaying the
local/dynamic ratsnest. Calls the ratsnest clear from selection clear
Notably, it appears that the tool actions do not chain transitions for
the same event. So only a single action (first specified) will be
executed when an event fires unless the actions are executed by separate
tools.
Fixes: lp:1809752
* https://bugs.launchpad.net/kicad/+bug/1809752
SEGZONE types were confusingly named PCB_ZONE_T. Zones in pcbnew are
now _only_ PCB_ZONE_AREA_T, so we name segzone types PCB_SEGZONE_T to be
clear.
This also removes processing of the SEGZONEs from connectivity
calculations.
Deselecting each individually had the side-effect of possibly re-drawing
the view in between actions, leading to visible artifacts in the router
(where invisible items are set visible before committing a change)
We had been deselecting items after calling edits to be safe in case the
item was deleted/exchanged by the edit. The item pointer itself remains
valid even when deleting as it is assigned to the undo stack. But it
should not remain visible or selected on the schematic if it is removed.
This tests for removed items by checking whether it (in the case of
first-level BOARD_ITEMS) or its parent (in the case of footprint item
components) remain in the view list after editing. If they are still in
the view list, then we re-select them.
( cherry-picked from 2c6d0ffe2 )
Fixes: lp:1765774
* https://bugs.launchpad.net/kicad/+bug/1765774
Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
PCB_BASE_FRAME::PlaceModule() calls CN_CONNECTIVITY_ALGO::Update()
on the new footprint that does not have nets assigned. The Update()
method first removes the footprint (but it has not been added, so
nothing happens) and then adds it with all pads marked as not connected.
Later, when BOARD_COMMIT is pushed - it tries to add the same footprint
again with nets assigned, but the pads are already registered, therefore
they are discarded.
To prevent this, PlaceModule() does not call CN_CONNECTIVITY_ALGO::Update()
for the just created footprint, as it is handled by BOARD_COMMIT later.
Revert() method was still not aware of CHT_DONE flag, therefore
the switch statement was always invalid. To fix it, the commit
type is split to type and flags as is done in Push() method.
- renamed connectivity.[h|cpp] to connectivity_data [.h|.cpp] so that the file name matches the main class name.
- GetNetItems() now returns a vector instead of a list
- fixed netcode propagation bug
- factored out EDIT_TOOL::m_offset, now selection offset is stored in SELECTION class
- added VECTOR2I-based Move/Flip/Rotate methods in BOARD_ITEM
- added selection of reference point
- added snapping when pasting
- some minor code refactoring
- disabled pasting between footprint and pcb editors due to model incompatibility
Call UseDrawPriority( true ) after creating GAL to enable.
VIEW::Add() gets a new optional argument to specify the draw order
when adding an item. If the new argument is left default, the draw
order will increment with each call of VIEW::Add().
Fix std::bind calls after change to VIEW::Add
- Finalize transition to BOARD_COMMIT (removed all remaining uses of PICKED_ITEMS_LIST) and implicit view/ratsnest updates
- Simplified SELECTION class, it now can be directly added to a VIEW
- Removed unnecesary casts and templates
- Introduced C++11 features (range based for, lambdas) where they improve code readability
- Added non-undoable COMMITs, which can be used to propagate change notifications to interested listeners (e.g. ratsnest/view)