Commit Graph

10117 Commits

Author SHA1 Message Date
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 0afb249447 Add drawing priority support to VIEW
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
2017-02-28 14:47:20 +01:00
jean-pierre charras be10de8d28 Eeschema: Fix crash when reading a library if a symbol having aliases generates a parse error after its ALIAS list definition 2017-02-28 12:52:37 +01:00
jean-pierre charras 94037f4d3d Fix eeschema crashes when a library has a component where the name under "DEF" does not agree with the name under "F1"
(now "F1" is forced to name given by "DEF", like in stable version)
Fix also an incorrect parsing of .dcm file, if  a component was not found in corresponding symbol lib.
(Can happen for not updated .dcm files)
2017-02-28 11:48:01 +01:00
John Beard a0df0f7f06 When filling/unfilling zones, create undo points in GAL
This is a feature which is apparently not available in legacy, but the
undo points created in GAL do work in legacy mode.
2017-02-27 18:00:51 +01:00
John Beard 796f3219d0 Draw zone hatching in GAL
This just uses the same hatch lines that are built into the zone as
legacy.

They are always drawn, even when there is a fill, as if the fill
doesn't reach the corners, the hatches can be seen.

Fixes: lp:1487043
* https://bugs.launchpad.net/kicad/+bug/1487043
2017-02-27 18:00:46 +01:00
jean-pierre charras 64d6c3f91c eeschema segfault when a library "T" command is missing Halign Valign values
Fixes: lp:1668082
https://bugs.launchpad.net/kicad/+bug/1668082
2017-02-27 17:22:06 +01:00
jean-pierre charras f35cb6cd6a Fix: if a part description has a problem in a library, Eeschema crashes due to a double deletion. 2017-02-27 16:13:16 +01:00
Maciej Suminski 799c8b6922 Fixed a shadowed variable warning in clipper 2017-02-27 10:42:32 +01:00
Maciej Suminski 9ead2b068b Fixed crash when placing a component in standalone eeschema
Fixes: lp:1668157
* https://bugs.launchpad.net/kicad/+bug/1668157
2017-02-27 10:29:53 +01:00
Oliver d6097cf1aa Better footprint association and filtering:
1. If a footprint filter contains a : (colon) character, then the filter is matched against the pattern <LibName>:<FootprintName>
2. If there is *no* : (colon) character present, then it is matched against <FootprintName>
3. The same behaviour applies for the manual filter string in CvPCB
2017-02-26 18:15:23 +01:00
jean-pierre charras 6b431b4791 Fix transaltion issue.
Rebuild dialog_display_options_base with a recent wxFormbuilder version.
2017-02-26 13:03:38 +01:00
jean-pierre charras 1001442a48 Pcbnew: Fix an assert in debug mode, and fix a minor issue in menubar 2017-02-26 11:47:15 +01:00
jean-pierre charras 94bef6abd2 Pcbnew: files written when layers have numeric name (like +24)cannot be read
Fixes: lp:1667867
https://bugs.launchpad.net/kicad/+bug/1667867
2017-02-25 10:10:43 +01:00
Chris Pavlina e6de99cc86 No more wxSearchCtrl in DIALOG_CHOOSE_COMPONENT
It is buggy on several platforms
- macOS: eats Esc key
- Windows: poor text alignment
2017-02-24 16:01:58 -05:00
jean-pierre charras 6bd2110449 Remove a printf clearly for debug, certainly a very old bug 2017-02-24 20:51:50 +01:00
jean-pierre charras 6ae7c15d89 Rework on pcbnew menubar: make code more easy to read and modify. 2017-02-24 20:51:49 +01:00
Chris Pavlina 23d4da9e49 Optimize TWO_COLUMN_TREE_LIST column sizing
This was particularly slow for very long lists on macOS.
2017-02-24 12:51:53 -05:00
Chris Pavlina 9effcb80e7 Optimize SCH_PLUGIN enumeration for populating the component chooser 2017-02-24 11:47:27 -05:00
Maciej Suminski adba96fd2b Changed optional::value_or() to optional::get_value_or()
get_value_or() is considered deprecated, but still works in the newest
boost (1.63). On the other hand, value_or() is not available in some
versions that are still used by major distros.
2017-02-24 17:34:23 +01:00
Maciej Suminski e34b73e187 Do not freeze cursor when a tool was cancelled using the context menu
dispatchContextMenu() stores the cursor position before displaying a
menu, so the tools use the original cursor position when processing
events (instead of the mouse position pointing to a menu entry). Later,
the previous position has to be restored, but if in the meantime the
tool was cancelled - previous settings were restored to a wrong tool.
2017-02-24 16:55:18 +01:00
Maciej Suminski b25ded4d90 Store VIEW_CONTROLS settings when tools are switched
Fixes: lp:1663783
* https://bugs.launchpad.net/kicad/+bug/1663783

Fixes: lp:1667580
* https://bugs.launchpad.net/kicad/+bug/1667580
2017-02-24 16:47:19 +01:00
Maciej Suminski 57050cdeb3 Introduced VIEW_CONTROLS::SETTINGS to keep settings
The new class facilitates saving and restoring VIEW_CONTROLS
settings such as cursor visibility, snapping, etc.
2017-02-24 13:33:17 +01:00
Maciej Suminski d3edc4f843 Disable router menu when the tool is stopped 2017-02-24 13:32:47 +01:00
Maciej Suminski 72cae92320 Disable context menu trigger if the assigned menu is set to null 2017-02-24 13:32:43 +01:00
John Beard c001c6114f Add cancel interactive tool action to GAL
This is used to provide menu entries that allows cancellation of
interactive drawing and routing tools without needing the keyboard.

It is provided in the drawing tools and the router tool.

The cancel event doesn't have any new functionality (e.g. track rip-up
for the PNS router - lp:1448460), this just adds it to the menu, where
it behaves the same as an Escape keypress.
2017-02-24 10:37:07 +01:00
Chris Pavlina d3cb23b7d7 Remove unneeded state member in DIALOG_CHOOSE_COMPONENT 2017-02-23 20:59:15 -05:00
Chris Pavlina 2683af26c0 Fix DIALOG_CHOOSE_COMPONENT enter and double-click events 2017-02-23 20:51:29 -05:00
Simon Richter 986c92f880 Remove unnecessary double define
CMake already sets NDEBUG by default for Release builds, no need to duplicate this.
2017-02-23 14:54:11 -05:00
Simon Richter 70b3edd06f Drop unnecessary and possibly harmful optimization setting
Using -O3 is default for release builds with gcc/clang anyway, so this
doesn't gain anything, but overwriting the existing flags might remove some
that might be needed.
2017-02-23 14:44:15 -05:00
jean-pierre charras 04d1b2fca7 fix incorrect COLOR4D::COLOR4D( EDA_COLOR_T aColor ) ctor for UNDEFINED_COLOR 2017-02-23 18:17:47 +01:00
jean-pierre charras 039910cb21 Fix incorrect initialization of a color parameter, which make the drawings in black in libedit 2017-02-23 17:55:55 +01:00
jean-pierre charras 2f24b31b28 simplify color calculation. 2017-02-23 17:55:55 +01:00
Simon Richter 3bf0b9534c Fix incorrect parameter if the compiler doesn't support -Wshadow option 2017-02-23 17:55:55 +01:00
John Beard 88fb7483eb Register COMMON_TOOLS in modedit
Without this, no actions from that tool will work, which includes things
like settings the grid size.

Fixes: lp:1667264
* https://bugs.launchpad.net/kicad/+bug/1667264
2017-02-23 15:20:22 +01:00
jean-pierre charras 1f345052cd Fix erroneous conversion between wxColor and COLOR4D 2017-02-23 14:30:43 +01:00
jean-pierre charras cf70aa925c Fix shadowed warnings with overzealous compilers 2017-02-23 13:17:23 +01:00
jean-pierre charras 11dcb76fc9 Add -Wshadow compil option, if exists to warn about shadowed variables.
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
jean-pierre charras a9d6af8001 Fix a comment 2017-02-23 13:17:23 +01:00
Marco Sterbik d284fb87e8 Change reporter message of footprint missmatch to warning on netlist-import
The message of a changed footprint during netlist-import in pcbnew was declared
as RPT_UNDFINED and therefor the filter didn't work correctly ('Warning' was
in the message-string).
This makes the message a proper warning and enables filtering as expected.
2017-02-23 11:59:00 +01:00
Maciej Suminski 887f2b2a70 Adjusted "Select" context menu conditions
Shows "Select" submenu when there is at least one item selected.
It is necessary to use "select same sheet" and selection filter
effectively.
2017-02-23 10:50:38 +01:00
John Beard c6046d6da2 Add selection filter dialog to GAL
Fixes: lp:1535805
* https://bugs.launchpad.net/kicad/+bug/1535805
2017-02-23 10:50:38 +01:00
John Beard 6ba9a512b6 Factor DIALOG_BLOCK_OPTIONS into separate compilation unit
This means the dialog can be accessed from both GAL and legacy modes.

This also removes the use of static bools for passing the selection
states and instead used a struct of values passed in by the calling
code.
2017-02-23 10:50:38 +01:00
Maciej Suminski 1077b679c5 Minor updates to the Tool Framework documentation 2017-02-23 09:45:43 +01:00
John Beard 6b39e9ea81 Update GAL tool documentation
Update to reference new PCB_ACTIONs (used to be COMMON_ACTION)

Also expand on use of BOARD_COMMIT.

Add doxygen TOC markup
2017-02-23 09:00:55 +01:00
jean-pierre charras 10396ff435 Tool manager: renames Yield() to KiYield(), due to a collision name between the Yield macro in wxWidgets and Tool manager Yield.
Can be dependent on platforms.
2017-02-23 08:30:29 +01:00
Chris Pavlina d1a2ed63c0 Add gal as dependency of common
This is required due to the use of COLOR4D in common
2017-02-22 19:45:52 -05:00
Jon Evans f9bc5914b3 Wrong type of arguments in wxPen constructor
Has pointed out by Jon Evans the constructor need the .ToColour() and should be called like:
wxPen pen( GetParent()->GetGridColor().ToColour(), h );

Submitted-by: Diogo Condeco <diogocondeco@gmail.com>
2017-02-22 14:12:58 -05:00
Joseph Y. Chen ed16beb5cd Rearranged Part Editor Icon Positions
The changes were made to rearrange the positions of the first 5
icons in the part editor so that they are consistent with footprint
editor.

Signed-off-by: Joseph Y. Chen <joseph.chen59@yahoo.com>
2017-02-22 13:24:49 -05:00
Maciej Suminski d7bf44eee0 Removed a few more headers from base_struct.h 2017-02-22 17:54:01 +01:00