This patch fixes a problem with GAL where zones are ignored in ratsnest
calculation.
The problem is that calling RN_DATA::Update on a zone with no polygons
(an unfilled zone) will remove the zone successfully, but then
RN_DATA::Add is a no-op.
From this point on, because ::Update refuses to work on items that have
not been ::Add'ed, the zone is removed entirely from ratsnest
calculation and will only be reconsidered once it is explicitly ::Add'ed
again.
The fix is to explicitly create an empty RN_ZONE_DATA object for every
zone that is ::Add'ed.
A second problem is that the point editor forgot to call
RN_DATA::Recalculate after calling Fill_Zone.
Fixes: lp:1537120
* https://bugs.launchpad.net/kicad/+bug/1537120
Modifies the selection menu to be adaptive and disable selection options
that are not possible.
Adds a new selection option that is only available when selecting
modules, this tool will select all footprints on the same sheet level or
belonging to subsheets. It will also search for nets that are only
connecting between modules on the same sheet or lower and select every
segment and via belonging to it.
This action launches the normal interactive zone tool, but re-uses the
settings from an existing zone, based on a flag passed to the main zone
function.
Break a chunk of the new zone tool out into a separate function to keep
the code clear. When zone cutouts and similar zone tools are added,
they'll get the settings from existing zones.
This commit now used std::unique_ptr for the temporary zone item, which
simplifies handling of the ownership of that item.
This commit wires up the as-yet-unused "remove alternate" tool action
and uses it to select copper connections (normally 'U') before deleting
segments.
THis also reverses the sense of Delete and Backspace (Delete used to be
'remove' and Backpace was 'remove alt', now it is reversed). This means
that backspace is the key that removes a segment and Delete removes the
track. This is the same as legacy behaviour. Other delete actions are,
for now, the same between Delete and Backspace.
Fixes: lp:1517213
* https://bugs.launchpad.net/kicad/+bug/1517213
The previous behaviour was to act on only the first item in the
selection. The new behaviour is to act on every eligible item (in this
case, tracks and vias).
Provide a visual feedback to the user how each rotation
will affect the routing by immediately reflecting the
change in ratsnest orientation.
Signed-off-by: Aurabindo J <mail@aurabindo.in>
Fixes: lp:1663488
* https://bugs.launchpad.net/kicad/+bug/1663488
This makes "rotate" into two separate TOOL_EVENTs, which each have a
"multiplier" parameter.
Also added is a namespace for 'free functions' that use TOOL_EVENT
public interfaces (perhaps with other inputs too) to centralise some
decision-making and calculations.
Fixes: lp:1660731
* https://bugs.launchpad.net/kicad/+bug/1660731
Automatically switch to a drawing layer, if a copper layer was
preselected. No annoying message boxes.
Do not deactivate the tool on layer switch.
Replaced setting updatePreview with direct calls to VIEW::update
Line width is kept in m_lineWidth for all shapes.
Import becomes apply and export becomes copy.
The term "push" to apply settings globally has not been renamed.
Swap the order of the copy and apply in the context menu.
Perviously, the generic snapping code would choose the nearest of the
module origin and origin of each module pad when selecting a module
using the "Find module" tool (T hotkey).
This is unlikely to be expected unless the cursor is already near the
correct pad or the module centre.
New behaviour is to pick up by module origin first, then
select the module. This means that the cursor is already nearest the
main module origin anchor, so that is what will be used.
Fixes: lp:1571214
* https://bugs.launchpad.net/kicad/+bug/1571214
This implements the pad import/export to the board's master pad setting
in the GAL canvases.
Implemented as a new GAL tool: PAD_TOOL.
It uses the same dialog, which has been split out into its own files in
pcbnew/dialogs, rather than along with frame methods in
pcbnew/globaleditpad.cpp.
Fixes: lp:1619304
* https://bugs.launchpad.net/kicad/+bug/1619304
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.
Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.
Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
When creating a copy of CONTEXT_MENU, always a CONTEXT_MENU instance was
constructed, whereas an inherited type should be used. Solved with
CONTEXT_MENU::create() that has to be overridden in inheriting classes.
Event & update handlers are now virtual functions, instead of setting
the handlers with Set{Event,Update}Handler().
Since you have to explicitly enter the module editor with the menu or
hotkey, allowing editing of module sub-parts once in should not cause
any unexpected changes.
Fixes: lp:1591625
* https://bugs.launchpad.net/kicad/+bug/1591625
In principle, this patch reverts 2eefa117. The difference is removal of
one unused method (SELECTION::clear) and fixing hidden overloaded
virtual methods warnings.
Fixes: lp:1657569
* https://bugs.launchpad.net/kicad/+bug/1657569
There used to be a number of TOOL_ACTIONs that had entries both in
SetTransitions() and the event loop, which seemed redundant and
troublesome.
Now it is not necessary anymore, transitions setup is enough to execute
associated actions.
The problem with simple deleting VIEW_ITEM_DATA upon VIEW_ITEM removal was
caused by the default copy constructors that copied pointers.
Once a copy of an item was destroyed, the VIEW_ITEM_DATA has been
destroyed, effectively invalidating m_viewPrivData for the other item.
This means that non-top-level tools, for example EDIT_TOOL and
PCB_EDITOR_CONTROL can submit their own menus to the top-level tool's
TOOL_MENU, which will then retain a reference to it and make it
available for the CONTEXT_MENU that is shown.
Add a class TOOL_MENU, which provides a management class for a
CONDITIONAL_MENU and a set of CONTEXT_MENUs. The aim of this is to
provide a central place where all TOOL_INTERACTIVEs can get a "basic"
context menu that either they or other tools can register new items and
sub-menus against.
This means that "top-level" tools no longer need to manage the lifetimes
of any CONTEXT_MENUs that they add, and can also delegate simple menu
display functions.