Commit Graph

10295 Commits

Author SHA1 Message Date
Julius Schmidt a54830897b Fix intermittent canvas revert to default
The attached patch fixes a minor bug where opening the 'View' menu
will sometimes revert the canvas to the default canvas.  The problem is
that wxMenuItem::Check will cause a menu event when the status is changed even
if the checkmark is being *unset*.  The workaround is to only call Check with
a true argument.  This works because the menu items are radio buttons.
2017-02-10 14:52:26 -05:00
jean-pierre charras dd5b024903 Pad export/import settings functions: remove duplicate code. 2017-02-10 20:44:35 +01:00
jean-pierre charras 9d43817db8 Make a debug message not translatable. 2017-02-10 20:44:35 +01:00
Wayne Stambaugh 899fe08f20 Remove KICAD_USE_SCH_IO_MANAGER build option from docs and build info. 2017-02-10 11:58:15 -05:00
Wayne Stambaugh 7ccdca5ced Use library ID to store library symbol information in the schematic symbol.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.

Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString.  Please note that only the library ID name is used to
search the list of libraries.  The library nickname is ignored.  Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.

Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
2017-02-10 08:36:59 -05:00
Wayne Stambaugh ebfbbcc1f5 Fix missing part library broken by schematic I/O plugin changes.
The LIB_PART object stores a pointer to the PART_LIB that it belongs to.
Now that the PART_LIB is no long responsible for loading the library, add
the PART_LIB pointer after the library is loaded by the plugin.
2017-02-10 08:36:58 -05:00
Wayne Stambaugh fda677eecc Prevent schematic I/O plugin from setting the library cache to null.
Don't call init() when performing library functions as it was always
setting the m_cache variable to null which cause the library to be
reloaded every time a library command was performed as well as a
memory leak.

Delete cache object when the plugin is destroyed.
2017-02-10 08:36:58 -05:00
Wayne Stambaugh 73bbc35c3e Make the schematic I/O plugin the only option.
Add SCH_PLUGIN object to PART_LIB object.

Convert all PART_LIB I/O to use SCH_PLUGIN.

Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.

Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.

Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library.  This is to prevent the cache library from being
written every time a new symbol is added.

Add option to not save library document file when saving library.  This is
primarily used by the cache library write code.

Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.

Add exception handling where LIB_PART caught the exception and returned
an error status.

Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
2017-02-10 08:36:57 -05:00
jean-pierre charras 283ba553ba Change wxItemMenu GetLabel (deprecated) to GetItemLabelText
GetLabel can compile or not, depending on the compatibility level used to build wxWidgets.
2017-02-10 08:33:48 +01:00
Maciej Suminski 1bcbbb41cd Fixed double menu entries in context menus 2017-02-10 00:08:53 +01:00
Maciej Suminski 5f90c0e8b8 Capitalized menu labels to follow the UI policy 2017-02-10 00:08:48 +01:00
Maciej Suminski 060e163511 Fixed invoking TOOL_ACTIONs in submenus
Fixes: lp:1663101
* https://bugs.launchpad.net/kicad/+bug/1663101
2017-02-10 00:08:23 +01:00
Maciej Suminski 6dec72b3c6 Added const modifier to strings in pcb_calculator xpm files
When there is no const modifier gcc warns:
warning: ISO C++11 does not allow conversion from string literal to
'char *' [-Wwritable-strings]
2017-02-09 13:17:31 +01:00
Clemens Koller c9b7647fe0 pcb_calculator: make color code tolerance selection top aligned.
Signed-off-by: Clemens Koller <cko@embeon.de>
2017-02-09 13:04:50 +01:00
Clemens Koller 0a950282c8 pcb_calculator: delete obsolete sources of binary bitmaps (.pngs)
The bitmaps/*.xpm files can be edited as regular pictures
(i.e. using GIMP), so, bitmaps/sources/color_code/* don't need to be
kept as well.

Fixes: lp:1005383

Signed-off-by: Clemens Koller <cko@embeon.de>
2017-02-09 13:01:08 +01:00
Clemens Koller 1161a23b7d pcb_calculator: Cleanup color code bitmaps and remove Ohm sign.
Fixes: lp:1005383

Signed-off-by: Clemens Koller <cko@embeon.de>
2017-02-09 12:58:22 +01:00
John Beard bed0ad142d Add zone duplicate onto layer to GAL
This adds it into the PCB_EDITOR_CONTROL tool, alongside the zone merge
tool.
2017-02-09 12:50:48 +01:00
John Beard 7045ed92fb Add CCW rotation to GAL canvas
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
2017-02-09 12:50:47 +01:00
Maciej Suminski a3e16988be Remove shadow of drawn arcs after undoing them (GAL) 2017-02-09 12:19:16 +01:00
Maciej Suminski 7806cb7bca Drag tracks/vias menu entry (GAL) 2017-02-09 12:03:28 +01:00
Maciej Suminski a16586756f Moved EDIT_TOOL::hoverSelection() code to SELECTION_TOOL::CursorSelection() 2017-02-09 12:03:28 +01:00
Maciej Suminski 14b9e5991b Draw ratsnest lines using the color selected in the layer widget (GAL)
Fixes: lp:1657039
* https://bugs.launchpad.net/kicad/+bug/1657039
2017-02-09 12:03:28 +01:00
Maciej Suminski 2a9c6a6283 Minor DRAWING_TOOL refactor
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.
2017-02-09 12:03:28 +01:00
Maciej Suminski 6c5e5c27e2 Fixed bounding box computation for EDIT_POINTS class 2017-02-09 12:03:28 +01:00
jean-pierre charras 0dc11936ad Fixes: lp:1662702 (Pad Properties Dialog not responding to OK button when run from ModEdit toolbar)
https://bugs.launchpad.net/kicad/+bug/1662702
2017-02-08 09:27:52 +01:00
John Beard 2710221f5f Do not include arc centre in bounding box
Arc centres don't land in the bounding box when the arc angle is small.
Currently, there are added to the BB, which leads to surprising
selection beheviour of arc segments (the BB can be much larger than
expected).

This commit omits the arc centre from the calculation.

Fixes: lp:1492734
* https://bugs.launchpad.net/kicad/+bug/1492734
2017-02-07 23:33:18 +01:00
Nick Østergaard 1cb171acf0 Rename bitmaps to match the new pad tool naming 2017-02-07 23:08:09 +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
Chris Pavlina 8f5c3c9e4e pcbnew: menu bar UI compliance tweaks 2017-02-07 16:38:41 -05:00
Chris Pavlina 59a4dffdcb modedit: menu bar UI compliance tweaks 2017-02-07 16:38:34 -05:00
Chris Pavlina b7edc464b0 kicad: menu bar UI compliance tweaks 2017-02-07 16:38:27 -05:00
Chris Pavlina 9bb1b33e89 libedit: menu bar UI compliance tweaks 2017-02-07 16:38:23 -05:00
Chris Pavlina 93a90926c2 eeschema: menu bar UI compliance tweaks 2017-02-07 16:38:18 -05:00
Chris Pavlina bca74853d1 Display more information in component selector 2017-02-07 15:01:20 -05:00
John Beard cdc392867a When 'Find-moving' modules in GAL, pick up at origin
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
2017-02-07 11:19:38 -05:00
Oliver a5dcc192dc Fix for bug where rotating / editing a selected item would remove it from screen
- Added test to see if there was a currently-editing item

Fixes: lp:1661866

https://bugs.launchpad.net/kicad/+bug/1661866
2017-02-07 09:12:38 -05:00
Wayne Stambaugh f96628f5c2 Fix minor layout issues in footprint editor footprint properties dialog. 2017-02-07 08:43:25 -05:00
John Beard 4ffabcc836 Show lines of zero thickness in GAL
If a line has zero thickness, use the outline thickness to draw it.

This avoids having invisible items on the PCB that could still end up in
outputs, or "losing" an item by setting thickness to 0.

This only affects GAL drawing routines, the PCB data structures are not
affected, so any outputs will be the same.

Fixes: lp:1501749
* https://bugs.launchpad.net/kicad/+bug/1501749
2017-02-07 08:33:16 -05:00
Chris Pavlina ec952c9cde Design rule editor: minor UI improvements
- Move Select All buttons, after discussion in IRC found that numerous
users are unclear on exactly what those buttons would do. The <<< in
them was an attempt to associate them with a listbox, but in reality
created an association in the user's mind with the above "move" actions.

- Spacing, punctuation adjustments
2017-02-07 08:08:41 -05:00
jean-pierre charras 9074c57a28 panel_prev_model.cpp: try a better way to fix issue with wxSpinButtons on Linux. 2017-02-07 11:05:08 +01:00
jean-pierre charras fec02f6161 panel_prev_model.cpp: Fix a minor issue on Linux with wxSpinButtons.
The min and max values must be set, and the curr value forced to 0, to avoid disabling up or down arrows.
2017-02-07 10:26:03 +01:00
jean-pierre charras 42c9e4d602 panel_prev_model.*: fix minor issues. 2017-02-07 09:06:43 +01:00
jean-pierre charras cca0ffed60 panel_prev_3d: Add spin buttons and inc/dec by mouse wheel for 3D parameters 2017-02-07 09:06:43 +01:00
jean-pierre charras 43cb4560bf Rewrite code for PANEL_PREV_3D because the way events were previously managed are not compatible with a good mouse event management.
To avoid a lot of tedious code, wxFormbuilder is used to create the PANEL_PREV_3D_BASE class.
2017-02-07 09:06:42 +01:00
Maciej Suminski 6561c8e61a Fixed a crash occuring on closing pad properties dialog in Windows
Fixes: lp:1660276
* https://bugs.launchpad.net/kicad/+bug/1660276
2017-02-07 00:07:43 +01:00
Jean-Samuel Reynaud 13395d34dd Action plugins: handle undo/redo feature when running an action plugin. 2017-02-06 08:39:32 +01:00
Chris Pavlina 431abcff0c libedit: no units in the new Delete Part dialog 2017-02-05 09:08:07 -05:00
Oliver 4cd7514c8e libedit: Improved selection process for DeleteComponent
- Reused SelectComponent dialog
- Reduced selection to current library only
- Ability to filter component for deletion
- Automatically pre-select the current component
2017-02-05 08:50:22 -05: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
jean-pierre charras 1338ff02f9 Fix a build issue, broken by commit 78a5f450ce 2017-02-04 10:08:54 +01:00