Some grid/zoom tools are left in PCBNEW_CONTROL because they currently
depend on Pcbnew-specific class members. Once refactoring is done to
make it possible to use all zoom and grid controls outside of pcbnew,
these last tools can be moved to common to match their ACTIONs.
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
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.
The apply settings and push settings options now take account of the
validity of the global pad settings when deciding whether to show or
not.
Global pad push now requires a source pad and doesn't push from the
global pad setting when there is no selection.
The whole submenu is hidden when there are no enabled items.
Fixes: lp:1664016
* https://bugs.launchpad.net/kicad/+bug/1664016
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