Commit Graph

12 Commits

Author SHA1 Message Date
Maciej Suminski bc8668b039 Renamed PCB_ACTIONS::editModifiedSelection to selectionModified 2017-04-20 14:11:59 +02:00
Jon Evans fd4e2b042c Refactor SELECTION, SELECTION_CONDITIONS, and context menus to common
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.

Fixed compilation warnings on clang (Tom)
2017-02-28 14:47:20 +01:00
Jon Evans 4c83b0a94d Move TOOL_ACTIONs to their corresponding tools; create COMMON_TOOLS
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.
2017-02-22 10:32:48 +01:00
Jon Evans 167f45ca2b Refactor COMMON_ACTIONS into a base and derived class
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()
2017-02-22 10:32:48 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
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.
2017-02-21 09:50:15 -05:00
Maciej Suminski 6fdccc1829 PAD_TOOL: enable 'Apply' after copying a pad 2017-02-20 11:09:00 +01:00
John Beard 2fa17b4460 Put pad enumerate tool in PAD_TOOL submenu
Prior to this, it was in the top level of the selection
menu, and was always shown, even if the module editor
didn't have a loaded footprint.
2017-02-20 11:08:34 +01:00
John Beard ca91c27852 Adjust pad sub-menu enablements
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
2017-02-20 11:08:34 +01:00
jean-pierre charras dd5b024903 Pad export/import settings functions: remove duplicate code. 2017-02-10 20:44:35 +01:00
Nick Østergaard 45a8c2e27f Rename pad copy actions in the pad tool
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.
2017-02-07 23:08:09 +01:00
jean-pierre charras 9a6e5734bf Minor fixes: fix UI capitalization issues, and better comment in a menu. 2017-02-04 10:21:41 +01:00
John Beard beed72ffbb Add pad import/export/push to GAL canvas
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
2017-01-25 20:17:28 +01:00