Commit Graph

4445 Commits

Author SHA1 Message Date
jean-pierre charras df191606ab Fix a potential incompatibility (due to an old bug) with files which could be created by some recent pcbnew versions
It is unusual to fix an incompatibility with later versions, but it is due to a bug existing in this version,
and this is especially important for footprint files.
2017-01-28 09:00:54 +01:00
Wayne Stambaugh 556be7b431 Do not use default board solder mask clearance in footprint editor.
The footprint editor was displaying the default solder mask clearance
defined by the temporary BOARD object created a start up.  Change the
temporary BOARD default solder mask to 0 so the pad or footprint solder
mask clearance setting is displayed when editing the footprint.

fixes lp:1653980

https://bugs.launchpad.net/kicad/+bug/1653980
2017-01-27 07:52:12 -05:00
jean-pierre charras c23c52834c cleanup a comment 2017-01-24 17:53:33 +01:00
jean-pierre charras 981fddc649 Try to replace avhttp by Curl 2017-01-24 17:44:06 +01:00
Maciej Suminski 5a3c944b2a Fix crashes when BOARD members are changed and PNS is active
PNS has its own data model with pointers to the BOARD members. If the
tool is active and pointers become stale, pcbnew crashes.

Currently there is a workaround that deactivates the current tool when a
dialog opens. This is the way it is done in the legacy canvas as well.

Fixes: lp:1553804
* https://bugs.launchpad.net/kicad/+bug/1553804
2016-12-01 15:11:26 +01:00
jean-pierre charras 8023c7a794 Pcbnew: fix outdated environment vars settings for Kicad python on Windows (from master branch):
On Windows, previously, Pcbnew try to set env vars PYTHONPATH, if <kicad>/bin/python27_us folder is found.
Now, if python.exe is found in kicad bin folder (therefore if our python executable and libs are
installed in Kicad), PYTHONPATH and PYTHONHOME are set to an empty string.
( the default python path work fine with our standard python install )
2016-11-14 08:35:12 +01:00
jean-pierre charras 65fe561a4b Fix from master branch: lp:1635723 (pcbnew: allows sometimes to draw tracks in non copper layers in Gal Mode) 2016-11-13 19:03:52 +01:00
jean-pierre charras 94a3390544 * Pcbnew: in fill zones calculations, make polygons strictly simple before fracturing them. 2016-11-06 19:50:38 +01:00
jean-pierre charras cec3e300a8 fix incorrect indentation which generates compil warnings 2016-11-06 19:42:10 +01:00
jean-pierre charras a262445047 Fixes: lp:1638499 (footprint editor, footprint transform: incorrect mirror for pads (noticeable only for pads with offset)
https://bugs.launchpad.net/kicad/+bug/1638499
2016-11-05 15:53:01 -04:00
Henner Zeller 0fbdec4c08 Pcbnew: prevent reversal of pad loading order when loading board.
When opening a board file and storing it again, the pads in all
embedded modules get reversed.  This is generally not really nice
if the PCB is managed by version control as it creates churn and
could make merges hard.
2016-10-17 10:17:37 -04:00
Maciej Suminski bd1aae9071 Fixed a crash when a negative (although invalid) net code occurs in legacy plugin 2016-10-11 21:24:37 +02:00
Wayne Stambaugh 6382db4ebf Pcbnew: fix epic footprint editor DXF import fail.
The unfortunate combination of using static_cast to promote board items
to module items then using the assignment operator without any thought as
to what would happen in MODULE::Add() caused the board objects to not be
added to the module.  This is expected because board items cannot be in
modules.  Did this ever work or did someone have a colossal brain cramp?
If it did work, who ever changed it did not test it because in debug
builds, you would have gotten and assertion on every object imported.  On
release builds nothing is imported silently.

Add module object types to the DXF importer and code to choose which type
of object to import.

Remove offending static casts and assignment operator and pass the correct
object directly to the MODULE::Add() function when importing DXF in the
footprint editor.

The usual coding policy fixes.
2016-10-07 22:06:09 -04:00
Wayne Stambaugh 8151ec387c Pcbnew: fix drill file naming issue.
On windows when the project path include a remote volume name (\\NAME),
the volume name does not get cleared by calling wxFileName.SetDir( "" ).
This caused the volume name to be prepended to the file name when
calling wxFileName::GetFullPath().  Use wxFileName::GetFullName()
which resolves the issue.

Fixes lp:1606240

https://bugs.launchpad.net/kicad/+bug/1606240
2016-10-07 15:05:32 -04:00
Wayne Stambaugh ca0aa6c971 Pcbnew: fix several auto save file issues.
* When Pcbnew is launched in the stand alone mode with no board file command
  line option, the project path is set to the current working directory.  The
  user may not have write access to the current working directory which would
  cause the auto save to generate an error.  If the user does not have write
  access to the current working directory, set the path to a platform specific
  temporary path that the user has write permission.

* When Pcbnew is launched in the stand alone mode with no board file command
  line option, the default BOARD object has no file name.  Set the file name
  to "noname.kicad_pcb" to fix incorrect auto save file name and set the path
  to the user's platform specific document folder.

* Delete orphaned auto save files when closing without saving due to broken
  auto save file generation logic which prepended the file name with "$" rather
  than "_autosave-".

* Fixes: lp:1596382
2016-09-27 20:55:24 -04:00
Chris Pavlina 853984120c FUTURE_FORMAT_ERROR: don't nest errors unnecessarily. 2016-08-17 15:13:28 -04:00
Jean-Pierre Charras f776b7c3fb Pcbnew: fix a minor bug where the DRC report file is always created. (fixes lp:1593389)
* Prevent DRC file from being created regardless the option selected in the check box.
* The browse file dialog now open the current project folder by default.
2016-08-09 10:49:36 -04:00
Michael Steinberg 5f98fc0591 Fix dangling board reference crash in GAL. (fixes lp:1584489) 2016-08-05 08:49:12 -04:00
Thomas Pointhuber bcdcaa724d Remove front silkscreen default setting for PTH and NPTH pads. 2016-08-03 14:23:14 -04:00
Michael Steinberg 32f24289bd Fix segfault on BOARDs without tracks. 2016-08-03 08:40:07 -04:00
Jean-Pierre Charras 021320be1b Fix: footprint libraries wizard fails with personal GitHub accounts (now uses https://api.github.com/users/xxx instead of https://api.github.com/orgs/xxx to retrieve the list of .pretty footprint libraries) 2016-07-20 15:56:19 -04:00
Jean-Pierre Charras e309ca10d1 More OSX dialog fixes. 2016-07-18 19:33:12 -04:00
Jean-Pierre Charras 26c5485be9 Pcbnew: OSX dialog fixes. 2016-07-15 16:51:28 -04:00
jean-pierre charras 2ab90d6d20 Pcbnew: fix potential issue (crash) when loading board files with a missing net section (like created by Gerbview) due to an initialization made to late. 2016-07-05 11:20:38 -04:00
Bernhard Stegmaier 1f6789e692 Add support for optional touchpad panning (merge of rev. 6586 from development branch). 2016-07-04 21:43:55 +02:00
jean-pierre charras 90ed0183c8 Fix an issue in LOCALE_IO class, used to switch to/back locale "C" when reading/writing files: the back to locale was broken, and created issues in countries using the ',' as fp separator, especially when the non default language was used.
It was reported in many bugs.
2016-06-21 10:48:42 -04:00
jean-pierre charras 53f6bf29c7 Fix bug: DRC report to File crashes Pcbnew, if the file cannot be created (for instance if the CWD is not writable, or if the path does not exist)
Fix also an other issue: if the file path is not entered, the file is now created in the current project directory.
2016-06-15 15:00:41 -04:00
Alexander Lunev 606978297d pcad2kicadpcb: fixed an issue with an uppercase fileUnits parameter. 2016-05-27 16:40:37 -04:00
Maciej Suminski 9810236314 Mark locked tracks with 'L' letter in status field. 2016-05-27 14:56:09 -04:00
Maciej Suminski b73a71c696 Added 'Reset Grid Origin' hot key (GAL). 2016-05-27 14:51:32 -04:00
Chris Pavlina 2ffdc0d03d Fix file version support build error on some platforms. 2016-05-27 14:38:51 -04:00
Chris Pavlina 91f34a9478 Add support for PCB and footprint format versioning
Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:

1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.

2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.

This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
2016-05-27 14:36:53 -04:00
Matthew Petroff 67ab1be495 Correct multiple UI spelling errors. 2016-05-03 12:44:32 -04:00
Martin d`Allens fdc4d2a8a9 Fix typos in dialogs. 2016-05-03 11:32:49 -04:00
jean-pierre charras 3c8bed9c92 Fix issues in dialog drc: because it is not modal, DRC parameters and unit selection can be modified outside the dialog, still opened. Now, the new parameters are taken in account.
Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was changed (reloaded, cleared), pcbnew crashed because many pointers stored in dialog become invalid. Now the dialog is just closed.
2016-04-15 14:49:33 -04:00
Baranovskiy Konstantin f3d173fe64 Pcbnew: prevent zone tool from switching to no tool when deleting zone corner. 2016-03-22 13:49:38 -04:00
Cirilo Bernardo 44038c47c6 Various fixes to DXF import
* Correctly implement scaling based on DXF $INSUNITS - at least where
  INSUNITS is sensible. I ignore units like miles, gigameters, AU,
  lightyear, parsec ...
* Correctly implements LWPolylines, adding an ARC segment rather than a
  line segment when bulge != 0. A number of users have been complaining
  about getting the wrong board shape (chamfered corners rather than
  rounded corners) on DXF Import, now they shouldn't complain.
2016-03-21 10:22:04 -04:00
Jon Neal 16dbe11868 Change misspelled dxf conversion constant from member variable to static const like other conversion constants. 2016-03-21 10:15:56 -04:00
Chris Pavlina 68725bc20c pcbnew: don't pick up selection after unsuccessful Duplicate
Following rev 6627 (git 2777182), if a non-duplicatable item was the object of
a Duplicate action, the original item would be picked up, potentially
misleading the user into thinking something was actually duplicated.
2016-03-21 10:11:56 -04:00
jean-pierre charras 6657981553 Pcbnew: loading file with footprint on an inner layer causes an assertion. (fixes lp:1556424) 2016-03-14 09:20:51 -04:00
Eldar Khayrullin 286f6a426b Pcbnew: fix exception when importing pcad pcb with zero size pads (fixes lp: 1551353)
* Zero size pads are now just ignored.
2016-03-14 09:13:53 -04:00
jean-pierre charras cc058033cc Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
2016-03-11 16:30:32 -05:00
jean-pierre charras 18f07d8efb Pcbnew: create array dialog fixes. (fixes lp:1549231)
* No initial copied object changed (this was a serious bug to modify these
  objects. Previous version modified references and other texts using a
  broken algorithm).
* Only new pads are numbered (therefore renumbering is used only in footprint
  editor)
* Remove not working feature in circular array: now only use number for
  pads (other options using alphabetical letters are removed: did not work
  correctly).
* A more clear option is used to choose if the pads are numbered from a chosen
  value or from the first available value.
* Adding a warning message if a parameter is incorrect.
2016-03-09 09:15:42 -05:00
Wayne Stambaugh 5c4fbbec43 Pcbnew: prevent delete hot key from deleting locked footprints. (fixes lp:1538805) 2016-02-29 18:44:09 -05:00
Eldar Khayrullin 7d0299f153 Pcbnew: fix issues in PCAD import of P-CAD ASCII files. (fixes lp:1547822) 2016-02-24 13:03:56 -05:00
jean-pierre charras e9570fddd6 Remove CK1202_V1.pcb sample file, actually not used in Kicad, due to its unclear copyright. The http link to this sample file is in files.txt. 2016-02-23 10:38:51 -05:00
jean-pierre charras 34217c0199 Pcbnew: fix a crash when trying to export a footprint in a non writable directory, or if a non writable old file was existing. (Linux only. On Windows, the wxWidgets file dialog dectects this issue) 2016-02-23 09:16:50 -05:00
jean-pierre charras 9b0bd7ca1f Pcbnew: minor bug fixes.
* Use case insensitive comparison to choose import plugin from the file extension.  The
  file extension is not always lower case especially on Windows.
* onleftclick.cpp: fix false warning message in the legacy canvas which happens afte
   switching from the GAL canvas when a board item is still selected.
2016-02-19 09:52:18 -05:00
Dick Hollenbeck 48e2addd69 Pcbnew: fix bug opening P-CAD ASCII files. (fixes lp:1545668) 2016-02-18 11:33:11 -05:00
jean-pierre charras dcd81e23f4 Fix incorrect assertion failure in specctra export when a footprint contains segments on edge.cut layer (fixes lp:1545546) 2016-02-18 11:06:40 -05:00