Commit Graph

15300 Commits

Author SHA1 Message Date
jean-pierre charras e997a7db9a Gerbview: Sync issue between the D Code drop list and the active layer
Fixes: lp:1829234
https://bugs.launchpad.net/kicad/+bug/1829234
2019-05-15 16:28:18 +02:00
Wayne Stambaugh d1a065119e Pcbnew: fix crash when deleting DRC errors from DRC dialog.
Fixes lp:1828726

https://bugs.launchpad.net/kicad/+bug/1828726

(cherry picked from commit a32bb4e9a5)
2019-05-14 18:42:03 -04:00
Mario Luzeiro 1dab468e20 Add some epsilon value to ray dir on orthographic mode
so they will not be zero when viewing the board com the top/bot.
This was causing problems with BBox intersect function that was using
invDir values.

Fixes lp:1828747
https://bugs.launchpad.net/kicad/+bug/1828747
2019-05-14 16:10:54 +02:00
Henner Zeller c5cd0c73a3 Raytracing - a more pleasing way sequencing blocks to render.
(cherry picked from commit 2aea26de1e)
2019-05-14 09:28:55 -04:00
Wayne Stambaugh ae139403e4 Fix library table editor dialog environment variable grid column names.
Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1828459
(cherry picked from commit 6f27ef7f66)
2019-05-14 07:59:22 -04:00
Wayne Stambaugh d3c9154f9a Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
(cherry picked from commit 3c4f8c1bf7)
2019-05-13 16:22:52 -04:00
jean-pierre charras caba60968a Python fp wizards: fix a few issues in qrcode_footprint_wizard.py
Fixes: lp:1828744
https://bugs.launchpad.net/kicad/+bug/1828744
2019-05-13 13:26:08 +02:00
Jeff Young 2e0def8670 Defensive coding that will possibly fix a crash when scrolling through footprints.
Fixes: lp:1828289
* https://bugs.launchpad.net/kicad/+bug/1828289

(cherry picked from commit 717b1d37be)
2019-05-11 23:55:08 +01:00
Martin McNamara 8c3d16a395 PCBnew: Fixes crosshair issue with "Place Text" and "Add Dimension".
When using "Place Text" the crosshair was freezing if cancelled before
placing text.

After the crosshair freezes, the next uses of the "Place Text" or
"Add Dimension" caused the crosshair to jump to the screen location
where the previously the crosshair was frozen.

Cancelling the "Add Dimension" caused the crosshair to jump to the
screen location where the crosshair was when cancelled on the next use
of the "Place Text" or "Add Dimension".

Fixes: lp:1822578
* https://bugs.launchpad.net/kicad/+bug/1822578
2019-05-11 06:54:40 -07:00
jean-pierre charras 3f48531da7 DIALOG_EDIT_COMPONENT_IN_LIBRARY: fix a dialog resize issue (grid not resized). 2019-05-11 10:09:32 +02:00
Mark 128cdca068 Fix for SWIG 4.0.0
(cherry picked from commit 5685174808)
2019-05-10 14:38:26 -04:00
Michael Kavanagh bd997a3900 Add Save As hotkey to footprint editor
Fixes: lp:1828481
* https://bugs.launchpad.net/kicad/+bug/1828481

(cherry picked from commit a3483f44d2)
2019-05-10 15:39:33 +01:00
Wayne Stambaugh 8e93eda449 Eeschema: fix corrupted schematic and symbol library files.
Prevent user from pasting text with carriage return and/or line feed
characters in field value edit control in the schematic symbol and symbol
library properties dialogs.

Make all objects derived from GRID_CELL_TEXT_BUTTON use validators
correctly.

Add validators to FIELDS_GRID_TABLE object for field values other than
the mandatory fields.

Create a validator to check that a string is a valid LIB_ID.

Fixes lp:1828214

https://bugs.launchpad.net/kicad/+bug/1828214
(cherry picked from commit ae54f34392)
2019-05-10 09:16:38 -04:00
John Beard a6674ecd56 Pcbnew: remove SVG from menu text
The SVG importer is an advanced config. It's not supported or
normally available in 5.1, so don't advertise in the menu.

If the advanced config is enabled, the dialog will be able
to import SVG.

This could have been "Import *Vector* Graphics" like in master,
5.1 documentation will probably still say "DXF", so keep consistent.

Fixes: lp:1821571
* https://bugs.launchpad.net/kicad/+bug/1821571
2019-05-10 12:41:29 +01:00
jean-pierre charras 654651856f Custom pads: minor fix in legacy mode related to commit a155289f. 2019-05-09 16:46:13 +02:00
jean-pierre charras c489659a20 Custom pads: fix incorrect shape of masks when the shape is a polygon with holes and the mask margin is < 0. This is mainly the solder paste layer that shows this issue. This is due to the fact SHAPE_POLY_SET::Inflate does not work fine with polygons with linked holes. SHAPE_POLY_SET::InflateWithLinkedHoles it added to fix this issue.
Fixes: lp:1828287
https://bugs.launchpad.net/kicad/+bug/1828287
2019-05-09 16:24:39 +02:00
Wayne Stambaugh 18377e0c9f Developer documentation updates.
Remove version 5 road map since version 5 has been released.

Update version 6 road map to reflect current development goals.

Cleaned out old goals from generic road map in preparation for version
7 development.

Add note to compiling document about building with Boost 1.70 on Windows.

Fix link to Linux coding style policy in KiCad Coding Style Guide.

Update tool framework documentation to reflect changes in the tool
framework code.

(cherry picked from commit 3caa4376a5)
2019-05-08 08:39:00 -04:00
jean-pierre charras cebba6c0b9 Cairo GAL: fix incorrect arc position in mirror mode. the previous fix
(c56e540e5d) did not really work.

Fix from master branch.
2019-05-08 14:25:14 +02:00
John Beard 89f9bf545d All: fix horizontal touchpad panning
Commit e10c01aaf didn't work when touchpad panning was enabled.

This commit changes it to only discard horizontal wheel events
when in "scroll mode" rather than "pan mode".

Based on a patch by Adrian Scripcă <benishor@gmail.com>.

Follow-up to fix: lp:1828080
https://bugs.launchpad.net/kicad/+bug/1828080

(cherry picked from commit e6fe220f84)
2019-05-08 11:07:45 +01:00
Adrian Scripca 055d36abd7 All: fix spurious wheel scroll events caused when using modern mice.
Modern mice feature horizontal scrolling capabilities and those end
up being treated by KiCad as regular scroll events causing confusion
among users.

The fix works by discarding the handling of wheel events other than
the ones for the vertical axis.

Fixes: lp:1828080
https://bugs.launchpad.net/kicad/+bug/1828080
(cherry picked from commit e10c01aaff)
2019-05-07 17:36:23 +01:00
John Beard 7bafc5fa8b About dialog: Add mnemonics to the buttons
(cherry picked from commit 4a3add7ac5)
2019-05-07 11:15:13 +01:00
John Beard 6946c0bedb About dialog: update wxFB version
Avoid contaminating wxFB files with version fluff, which hides real
changes in the version history.

(cherry picked from commit cc28fb18fd)
2019-05-07 11:15:13 +01:00
jean-pierre charras bb40f86daa * Eeschema: fix incorrect display of the page number in a complex hierarchy.
When, inside a complex hierarchy, one switch from an instance of a sheet to an other instance of this sheet,
the page number shown in the worksheet was not updated on screen, and the initial number was displayed.

Fix from master branch.
2019-05-07 11:02:05 +02:00
John Beard 89d198659c Format: Default to switch cases on separate lines by default
Currently, the format enforces single lines when possible, but does
not enforce readable column-based alignment (and, moreover, *removes*
such manually added alignment:

    switch( m_orientation )
    {
    case PIN_RIGHT: m_orientation = PIN_UP; break;
    case PIN_UP: m_orientation = PIN_LEFT; break;
    }

Change this to multi-line by default:

    switch( m_orientation )
    {
    case PIN_RIGHT:
        m_orientation = PIN_UP;
        break;
    case PIN_UP:
        m_orientation = PIN_LEFT;
        break;
    }

If the developer wishes for column-aligned single-line cases, this
is permitted, but much be done manually:

    switch( m_orientation )
    {
    case PIN_RIGHT: m_orientation = PIN_DOWN;  break;
    case PIN_UP:    m_orientation = PIN_RIGHT; break;
    }

CHANGE: the _clang-format file to reflect this, and add note about
manual override in the dev docs.

(cherry picked from commit 272c045c37)
2019-05-07 09:50:22 +01:00
jean-pierre charras c56e540e5d Cairo GAL: fix incorrect arc position in mirror mode. It happens in print mode and also when the Pcb view is flipped.
Fixes: lp:1824720
https://bugs.launchpad.net/kicad/+bug/1824720

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

Fixes: lp:1823147
https://bugs.launchpad.net/kicad/+bug/1823147
2019-05-06 11:30:15 +02:00
Seth Hillbrand d3fd74246f Merge remote-tracking branch 'andrei/pr-gitignore'
(cherry picked from commit 4d776034ca)

This also picks up an additional line from 45aa514591 that keeps
CMakeModules/*.cmake.  The rest of that commit does not merge cleanly.
2019-05-02 10:38:40 -07:00
Wayne Stambaugh 616061a6ca Eeschema: fix broken symbol library links.
Force the symbol library links whenever the symbol library table has been
modified.  This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.

Fix the SCH_COMPONENT symbol resolver when falling back to the cache.  The
resolver was using the LIB_ID ':' notation which was failing.  Replacing
':' with '_' fixed this issue.  This was also an issue when generating the
symbol message panel information.

Convert wxLogDebug to wxLogTrace in symbol resolver code path.  Add new
trace type KICAD_SYM_RESOLVE.

Fixes lp:1821606

https://bugs.launchpad.net/kicad/+bug/1821606
(cherry picked from commit 7d803437e2)
2019-05-02 12:13:30 -04:00
Tomasz Włostowski d94b8b9c0e router: copy m_maxClearance when cloning/branching PNS::NODEs
Fixes: lp:1813328
* https://bugs.launchpad.net/kicad/+bug/1813328

(cherry picked from commit 9e00f48efc)
2019-05-01 11:39:15 +01:00
John Beard 89d39cf8ff Pcbnew: use same null check as eeschema for recently used
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.

Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.

The same logic in the symbol tree is already handled in the
same way.

(cherry picked from commit 42d20cbd96)
2019-04-29 17:00:42 +01:00
jean-pierre charras 0ba130dbd3 Pcbnew: fix in board editor crash when try to load a footprint from Add footprint tool if the latest loaded footprint was deleted. In this case, the history has a cleared link that created the crash when the dialog tried to select this deleted FootprintEnumerate
Fixes: lp:1826794
https://bugs.launchpad.net/kicad/+bug/1826794
2019-04-29 17:23:27 +02:00
John Beard 434935613c Eeschema: Fix/circumvert GTK3 tree view bug
There is a rendering bug in GTK3, which appears to be
an upstream GTK issue.

This can be worked around by, when filtering, ensuring the
*parent* item of the selected item is visible. This will
not cause the selected item to not be visible, as the selected
item will be the first shown child. So it will be visible, as long
as the list box is greater than a single row high, which it will be
in all practical scenarios.

This is done on all platforms, as it has a beneficial side-effect:
the parent library of the selection is naturally shown to the
user, so they don't need to scroll up to see what library their
current filter selection was in.

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

(cherry picked from commit 10900c918f)
2019-04-28 17:18:09 +01:00
John Beard 454585d3d2 GAL: add some trace to GAL display options config
This can be helpful when tracing where certain configurations
come from (some apps load from other apps' config basenames).

(cherry picked from commit fcc4a84e0e)
2019-04-27 14:58:50 +01:00
John Beard 65a6e341ad Eeschema: Symbol preview widget needs common config for Hi-DPI
Currently, this widget doesn't read the common library settings.
This means it doesn't use the configured DPI scaling or anti-aliasing
settings.

Use the ReadConfig method on the GAL options to fix (rather than
only ReadAppConfig).

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

(cherry picked from commit 33fe9a2761)
2019-04-27 14:58:50 +01:00
John Beard fc933034db Eeschema: fix resizing of pin table and edit symbol dialog
These dialogs had logic to avoid a table re-adjustment unless
the width changed. This was done to avoid spurious resizing
calls under GTK+3. This was commit
13249b723b, fixing bug lp:1817810.

However, by only calling event.Skip() when the width changed,
redraws were inhibited when only the height changed.

Placing the Skip() outside the width-change check fixes this,
and does not re-introduce the lp:1817810 bug (it is the column
adjust call that causes that).

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

(cherry picked from commit eccadd92fb)
2019-04-27 14:12:00 +01:00
John Beard 20c8b094d6 SHAPE_ARC: Fix bug introduced in 5813164d1.
This fixes the bug exposed in the previous commit.
The tests which exposed it now pass and expected failures
removed.

(cherry picked from commit d89d0e6b74)
2019-04-25 23:51:01 +01:00
John Beard 552ddfbdfa SHAPE_ARC: Expose bug introduced by 5813164d1 in tests
The angle needs to be added to the start angle.

Add tests to cover this:

* Check end point is correct
* Check midpoints are within tolerance

This would have prevented the bug fixed in 5813164d1,
as well as the bug fixed in this commit.

As well as failed tests, this manifests when routing across
Edge.Cuts arcs (unless they happen to start at 0 degrees
staritng angle).

Expose as expected failure to prove tests catch it.
Fix to follow in separate commit.

(cherry picked from commit 183f4fe9a5)
2019-04-25 23:51:01 +01:00
Tomasz Włostowski 9743eec3ab SHAPE_ARC: fixed polyline conversion bug introduced in e312e2b286
Fixes: lp:1826278
* https://bugs.launchpad.net/kicad/+bug/1826278

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

(cherry picked from commit 5813164d15)
2019-04-25 23:51:01 +01:00
Michael Kavanagh b3ad1dc26e PL editor: fix delete hotkey behaviour
Fixes: lp:1819419
* https://bugs.launchpad.net/kicad/+bug/1819419
2019-04-25 20:27:10 +02:00
Seth Hillbrand b6c9d4a88c Add missing header to qa
(cherry picked from commit 9c00a7a5c3)
2019-04-24 14:33:28 +01:00
Wayne Stambaugh 25b6ac61cb Begin version 5.1.2 development. 2019-04-22 17:16:51 -04:00
Wayne Stambaugh 9c9252e8a3 Tag release version 5.1.2. 2019-04-22 17:14:54 -04:00
John Beard 3a744ad72f Use old-style boost includes
The Boost::boost style library dependencies don't work
on some CMake versions (couldn't find library -lBoost::boost)

Use ${Boost_INCLUDE_DIRS} in the target_include_dirs() instead.

Cherry-picked (with changes) from: 1a9aa2e92d
2019-04-22 01:10:50 +01:00
jean-pierre charras 554e2a4bce qfn_wizard.py fixes. 2019-04-21 14:08:01 +02:00
Jeff Young 6e8979d8d8 Add try/catch block around writing a new library.
Fixes: lp:1825203
* https://bugs.launchpad.net/kicad/+bug/1825203

(cherry picked from commit 2bcf38d2b6)
2019-04-18 22:02:24 +01:00
jean-pierre charras 583d416640 DIALOG_CONFIGURE_PATHS: do not allow users to define the env var KIPRJMOD It always defines the project path, and should never be defined by users.
Fixes: lp:1824912
https://bugs.launchpad.net/kicad/+bug/1824912
2019-04-17 14:55:14 +02:00
jean-pierre charras 03b50b4f85 BOARD_NETLIST_UPDATER: fix 2 serious issues in dry run (memory leak and incorrect single pad nets deletion) Single pad nets deletion in dry run was incorrect when a new footprint was added, because in dry run it is not actually added, and the single pad nets deletion does not see these new pads, and can (incorrectly) delete some nets. 2019-04-17 14:55:13 +02:00
John Beard 440e135e3a QA: Remove expected failure from fixed tests
Commit 55fcbddde8 fixed a couple of
failures in the SHAPE_POLY_SET tests, so these no longer
need the expected failure markers.

(cherry picked from commit 371149756d)
2019-04-17 11:48:11 +01:00
John Beard ab39f06003 SHAPE_ARC: fix polyline conversion when radius=0
Prevent a divide-by-zero bug in SHAPE_ARC::ConvertToPolyline.

When the radius is zero, just use the initial angle (it makes
no different anyway, the result is the centre point, which is
the start point.

(cherry picked from commit e312e2b286)
2019-04-17 11:29:28 +01:00
John Beard 98f78f534c QA: Test arc to polylines - this has a bug
Add unit test of SHAPE_ARC::ConvertToPolyline.

This function has a bug when the arc is of zero radius. This
test shows the bug, but does not fix it yet.

(cherry picked from commit ce84c19a38)
2019-04-17 11:29:28 +01:00
Jon Evans d18b12c1a3 Hide simulator settings tabs that aren't implemented yet
Calling Hide() is apparently not enough in Windows

(cherry picked from commit 895d4c9e1a)
2019-04-15 23:21:31 -04:00