Commit Graph

10455 Commits

Author SHA1 Message Date
jean-pierre charras 6eb2000b69 fix Coverity warning (CID 151565) (CID 155147) 2017-04-01 20:05:33 +02:00
jean-pierre charras 04e24282a8 Fix bug: Render->Grid(Color) doesn't saved between kicad sessions.
Fixes: lp:1670084
https://bugs.launchpad.net/kicad/+bug/1670084
2017-04-01 11:48:02 +02:00
Chris Pavlina af88781262 Rewrite pcbnew preferences tooltips for consistency, fix a couple typos
Fixes: lp:1591428
* https://bugs.launchpad.net/kicad/+bug/1591428
2017-03-31 19:40:43 -04:00
Wayne Stambaugh 9c2ebf32f1 Initial symbol library table implementation prep work.
Add loading symbol library table code to schematic PROJECT object.

Fix minor issues with loading global symbol library table.

Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.

Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.

Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
2017-03-31 16:29:34 -04:00
Fabrizio Tappero dcaa0559de Minor edit component properties dialog improvements. 2017-03-31 15:30:00 -04:00
Maciej Suminski 0b57907a68 Fix crash on toggling 'Render' tab items visibility
Fixes: lp:1678169
* https://bugs.launchpad.net/kicad/+bug/1678169
2017-03-31 17:50:59 +02:00
Maciej Suminski 0a8a659ff7 Fix component chooser dialog crash if there are no FPs available 2017-03-31 17:15:09 +02:00
John Beard c3ff34e0df Add reset text attributes function to GAL - use for arc tool
Independent drawing functions (that don't expect any particular state to
be set up fo them) on the GAL need to reset the GAL properties they
use. This adds GAL::ResetTextAttributes() to make this easier.

This is important, as failing to reset mirroring can cause asserts in
OpenGL.

This is used in the Ruler tool (which previously did it one attribute at
a time) and also the Arc layout assistant, which previously failed to
reset mirroring.

Also reset on GAL construction, as these members appear to be
uninitialised.
2017-03-31 15:59:31 +02:00
Collin Anderson 9b876d9d98 Fix build of Python plugin for macOS 2017-03-31 08:49:48 -04:00
Jon Evans 8cd1df0524 Add output stream operator for COLOR4D 2017-03-31 06:48:04 -04:00
jean-pierre charras f16f39fd4c Gerbview: rework on load zip archive: better handling of non ascii7 filenames.
non ascii7 filenames of zip files issues are fixed.
There are still issues with non ascii7 filenames inside the zip archives (especially when a zip archive was created on Windows)
2017-03-31 10:55:13 +02:00
Chris Pavlina 3234087dc9 Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp
Fixes: lp:1677925
* https://bugs.launchpad.net/kicad/+bug/1677925
2017-03-30 21:47:14 -04:00
Wayne Stambaugh b4e2757119 Make FP_TBL_MODEL reusable.
Factor out the FP_LIB_TABLE specific content from FP_TBL_MODEL into a new
LIB_TABLE_GRID class that can be used for any library table grid mix in.

Create new FP_LIB_TABLE_GRID object for the footprint library edit dialog.

Add method GetEnvVariables() to return any environment variables found in
a LIB_TABLE object.
2017-03-30 18:36:37 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Wayne Stambaugh 40f60c9871 Fix netlist generation bug cause when component unit is set to zero.
Fix if statement logic to ensure the unit number is never set to zero.

Add logic to the legacy schematic plugin to automatically convert any
schematic files that have components with a unit setting of zero.  Set
the schematic modified flag so that the user will be notified of a
changed schematic.

Add a user warning when the schematic parser fixes the bug and sets
the file modified flag.

Fixes lp:1677282

https://bugs.launchpad.net/kicad/+bug/1677282
2017-03-30 15:44:47 -04:00
John Beard ef9f8d40c6 Init GAL class members (Coverity fixes)
Fixes: CID 157139 (GAL)
       CID 157138 (CAIRO_GAL)
2017-03-30 16:05:56 +02:00
John Beard c94269e173 Pcbnew GAL: Switch CW/CCW hotkeys to match legacy mode 2017-03-30 16:05:56 +02:00
John Beard 0b593faa93 Pcbnew: correct CW/CCW rotation.
These were backwards since internal angles are CCW due to the inverted Y
axis.

The hotkeys have NOT changed. This means 'R' is now clockwise and
'Shift+R' is anti-clockwise. This is the same as EEschema, but not the
same as Legacy mode.
2017-03-30 16:05:56 +02:00
Chris Pavlina e8b811bab7 kicad-ogltest: use OPENGL_GAL 2017-03-29 19:00:24 -04:00
John Beard fc7dad600f Ruler tool: reset text mirror/bold/italic before painting
This is required as the OpenGL GAL doesn't support mirrored
text, and if the state is not cleared after painting other mirrored
text, this is what is attempted.

Fixes: lp:1677210
* https://bugs.launchpad.net/kicad/+bug/1677210
2017-03-29 23:27:44 +02:00
Chris Pavlina 23590d8d3f kicad-ogltest: if version can't be interpreted, print it 2017-03-29 16:25:32 -04:00
Chris Pavlina c8ef5208ee Add initial ogltest tool for user testing
This tool is currently very rudimentary. I pushed it because I need to
collect responses from it from users with diverse graphics
configurations, so I want the tool to be in the nightly builds.

This affects no KiCad code.
2017-03-29 16:19:43 -04:00
John Beard 8f3423b803 Add Select Layer And Add Via actions to GAL router tool
On these actions, invoke the layer select dialog and set the via layer
pairs accordingly.

Fixes: lp:1672820
* https://bugs.launchpad.net/kicad/+bug/1672820
2017-03-28 15:13:27 +02:00
John Beard 69115e4b9d Signal via actions with flags, not event equality checking
This allows actions to encode both via type and other behaviours
intrisically witohut having to individually test for each action.
2017-03-28 15:13:24 +02:00
Chris Pavlina c8cdb51fa8 Add relational operators to component search
Fixes: lp:1578264
* https://bugs.launchpad.net/kicad/+bug/1578264
2017-03-27 21:26:49 -04:00
Chris Pavlina c7c172d368 Fix FP_LOADER_THREAD resource leak
The mechanism of thread termination was changed in 61c2beea and not done
correctly - the thread was not notified that it should terminate.
2017-03-27 14:23:03 -04:00
Chris Pavlina ffef8b6c56 Increase number of footprints listed in component chooser 2017-03-27 14:15:42 -04:00
Chris Pavlina feba091594 Highlight the first choice in rescue dialog
Fixes: lp:1455970
* https://bugs.launchpad.net/kicad/+bug/1455970
2017-03-27 08:45:05 -04:00
Chris Pavlina a9afb872d5 libedit: fix crash on Delete Component with no selection
This bug was actually here before the new component chooser this time;
I'm not sure what the purpose of this error message was since it is
being displayed in a non-error state. Maybe a copy/paste bug from when
Delete Component was changed to use the main component chooser?
2017-03-27 08:07:30 -04:00
Chris Pavlina d2b0a4b358 Component chooser: show aliases better
- In the listing, display alias names in italics
- In the info panel, display per-alias description correctly, as well as
  root description

Fixes: lp:1676190
* https://bugs.launchpad.net/kicad/+bug/1676190
2017-03-27 07:55:26 -04:00
jean-pierre charras cfac7bd31c Eeschema: fix a crash when closing the choose component dialog by OK button, if no component selected. 2017-03-27 08:53:19 +02:00
Chris Pavlina 61c2beea22 Fix FP_LOADER_THREAD access to destroyed dialog
Fixes: lp:1672733
* https://bugs.launchpad.net/kicad/+bug/1672733
2017-03-26 19:44:18 -04:00
Chris Pavlina ef11d110b2 Fix crash in cvpcb when filtering by component with no components
Fixes: lp:1656685
* https://bugs.launchpad.net/kicad/+bug/1656685
2017-03-26 18:48:50 -04:00
jean-pierre charras 0f0cb64a63 Minor fix in DRC test courtyards. 2017-03-26 08:13:23 +02:00
Nick Østergaard abd61ac1e7 Add boost include dir to qa/geometry
This is needed on OSX, I don't know why it works on linux and windows
without it.
2017-03-25 17:57:08 -04:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00
Chris Pavlina 68853c988e Fix SYNC_QUEUE build issue on Boost < 1.56
Prior to Boost 1.56, boost::optional had no move constructor, preventing
use of std::unique_ptr inside it
2017-03-24 10:09:08 -04:00
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
Alejandro García Montoro cc7825d00b Tests CPolyLine -> SHAPE_POLY_SET refactor.
Adds BOOST tests to the qa folder included in the geometry subdirectory.
The tests check whether the refactored code is consistent with the
legacy code. They also check some of the new code, as the family of
ITERATOR classes.
2017-03-24 10:43:47 +01:00
Alejandro García Montoro f68ce306bd CPolyLine -> SHAPE_POLY_SET refactor.
Removes the need of using the legacy code in polygon/PolyLine.{h,cpp},
refactoring all CPolyLine instances with SHAPE_POLY_SET instances.

The remaining legacy methods have been ported to SHAPE_POLY_SET;
mainly: Chamfer, Fillet, {,Un}Hatch.

The iteration over the polygon vertices have been simplified using the
family of ITERATOR classes.
2017-03-24 10:43:47 +01:00
John Beard 5aa1610362 Remove unused g_ShowPageLimits global variable
This variable was only defined, not declared in any header.
2017-03-23 12:47:05 -04:00
John Beard f723a5319c Move some unit related util function to base_units.h 2017-03-23 12:47:05 -04:00
Maciej Suminski b47a6e415b Fixed a memleak in DIALOG_CHOOSE_COMPONENT 2017-03-23 16:52:33 +01:00
John Beard e98ae3e463 Move executable name constants to own file
The executable name constants are only used by two files, they do not
have to be in common.h.

Also converted to const wxString for better type-safety and removed
old-style wxT macros.
2017-03-23 09:23:45 -04:00
John Beard ece7eeb280 Move SystemDirsAppend to own header
This function is called only from three sites, it doesn't need to be in
common.h.

The implementation was already in systemdirsappend.cpp, so a matching
header was created for it.

This reduces the visibility of the function to only the files that need
it and slightly shrinks common.h.
2017-03-23 09:23:45 -04:00
John Beard 27374c0aa3 Move file locking utilities to a separate file
The global ::LockFile() function is used in a single place, but it's in
common.h, so visible to all files.

The GetKicadLockFilePath function is used in only two places, and one of
them is LockFile.

This commit puts them both in a separate header, so they're only visible
to code using them.

The implementation of GetKicadLockFilePath is moved to lockfile.cpp,
where LockFile already was.

Also removed a (large) handful of wxT macros, which aren't needed any
more and make code less readable.
2017-03-23 09:23:45 -04:00
Maciej Suminski f2763e90ea Disable autopanning & cursor capture when drawing is finished 2017-03-23 14:15:34 +01:00
John Beard 0799d9e45c OPENGL_GAL: Init currentTarget
The currentTarget member of OPENGL_GAL is not initialised, but the
currentManager member is.

This commit uses SetTarget to initialise both target and manager to a
consistent state at construction.
2017-03-23 14:08:26 +01:00
jean-pierre charras 68b141dcb8 Make polygon built by BOARD::GetBoardPolygonOutlines strictly simple.
It fixes issues in 3d viewer (crashes and incorrect 3D board outline in some cases)

Fixes: lp:167484
https://bugs.launchpad.net/kicad/+bug/1674844
2017-03-23 08:56:52 +01:00
John Beard 9fe780f1b3 Rework zone creation in GAL
The zone creation in DRAWING_TOOL was a complex event loop whici
simultaneously managed the event handling, construction of the preview
polygon and the creation and commiting of the zone, all in the same
scope. This has been broken into several pieces:

* POLYGON_ITEM preview item, used to preview the polygon in progress
* POLYGON_GEOM_MANAGER is a class that collects points from user input
  and used them to describe a polygon's geometry, including calculation
  of 45-degree constrained leader lines
* ZONE_CREATE_HELPER is a class which deals with creating zones based on
  geometry from a geometry manager and parameters from the DRAWING_TOOL
* The (much simpler) event loop in DRAWING_TOOL drives the
  POLYGON_GEOM_MANAGER. With a minor refactor, this loop can be reused
  in future for other polygonal tools if wanted.

The polygon preview now has a translucent fill which makes it easier to
visualise the zone.

This also adds the Close Zone Outline and Delete Last Corner actions as
part of the new event loop.

Fixes: lp:1663885
* https://bugs.launchpad.net/kicad/+bug/1663885

Fixes: lp:1667885
* https://bugs.launchpad.net/kicad/+bug/1667885
2017-03-22 17:18:12 +01:00