Commit Graph

4324 Commits

Author SHA1 Message Date
Seth Hillbrand 0e5cc54ec9 Eagle: Fix crash when importing Eagle V6
This fixes multiple issues when importing Eagle V6 files.

Crashes occured when arcs of 0-length were found and when parts were
referenced in the schematic that were not found in the library.  This
could happen if the library and schematic were different cases.

Fixes: lp:1830564
* https://bugs.launchpad.net/kicad/+bug/1830564
2019-05-26 20:31:55 -07:00
Jon Evans d2a2dea9c4 Eeschema: fix worksheet and background color for printing
Fixes: lp:1820611
* https://bugs.launchpad.net/kicad/+bug/1820611

(cherry picked from commit 720b26d11e)
2019-05-26 14:26:26 -04:00
Jon Evans b40289c1bd Eeschema: use worksheet color when plotting
Fixes: lp:1825568
* https://bugs.launchpad.net/kicad/+bug/1825568

(cherry picked from commit e35be13b23)
2019-05-26 13:03:23 -04:00
Jon Evans 15cf25a6fc GerbView: Fix selection of the last two grid settings
Fixes: lp:1827642
* https://bugs.launchpad.net/kicad/+bug/1827642

(cherry picked from commit ba19d93df9)
2019-05-26 13:03:23 -04:00
Jon Evans e156e4509c Report actual intersection position for crossing tracks
Fixes: lp:1825588
* https://bugs.launchpad.net/kicad/+bug/1825588

(cherry picked from commit f101934909)
2019-05-26 13:03:23 -04:00
Jon Evans 549b76739e Exclude invisible items from view bounding box for zoom-to-fit
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457

(cherry picked from commit ede2575018)
2019-05-26 13:03:23 -04:00
jean-pierre charras b5c80fe689 Fix missing include to compile pcbnew_wrap.cxx 2019-05-26 09:12:03 +02:00
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
jean-pierre charras a6e6e914af Eeschema: make menu file history working again.
(the bug was due to an unexpected menuitem ID range used for the  menuitems of the history)
2019-05-25 20:58:28 +02:00
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Jeff Young b9898e2bb0 Fix crash when a pagelayout includes a bitmap or polygon.
Fixes: lp:1830439
* https://bugs.launchpad.net/kicad/+bug/1830439
2019-05-25 01:37:08 +01:00
Jeff Young a3dfce5adb Implement common file menu actions and move Eeschema over. 2019-05-25 01:14:21 +01:00
Jeff Young ba4ba5b668 Implementing boundingbox getters for WS_DRAW_ITEMs. 2019-05-24 21:23:26 +01:00
Seth Hillbrand f0352176ec Fix a compile error in Linux
Operands to the ternary operator cannot have different types under g++
(linux)
2019-05-24 12:12:10 -07:00
jean-pierre charras 32f25cf8b4 ACTION_MENU::appendCopy: Fix an issue on Windows with Check-able menu-items.
The source bitmap was copied to the new created item.
However, for Checkable menu-items, when setting a bitmap, our standard check bitmap is also added.
This is unwanted when the source bitmap is the wxNullBitmap (bitmap sizes are different)
2019-05-24 21:01:49 +02:00
Jeff Young 71f188f3de Hook up import-page-layout and change-background-color actions. 2019-05-24 19:49:10 +01:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 09424db68f Restore selection around undo/redo. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
jean-pierre charras 40382f4d52 Viewlib: menubar/view menu: make grid select working
Set also a better icon for this menu item
2019-05-24 15:49:51 +02:00
jean-pierre charras e957fb403b eda_draw_frame.cpp: fix missing EVT_MENU_CLOSE capture, that can create crashes.
in this case the crash can happens because a menu pointer used in EVT_MENU_HIGHLIGHT
is not cleared when closing the menu
2019-05-24 10:22:09 +02:00
Seth Hillbrand 1a56dfe342 Plotter: Ensure group style is respected in SVG
Graphics Changed is cleared when setting graphics for a group but needs
to be reset when the group ends.

Fixes: lp:1830245
* https://bugs.launchpad.net/kicad/+bug/1830245
2019-05-23 09:40:35 -07:00
John Beard 2dd5757eb5 Common: Fix copy-construction of empty BITMAP_BASE
The bitmap pointer is not checked at copy construct. This is
an instant segfault if you copy an empty bitmap.

Fix the constructor and remove the expected test failure, from the
previous commit.
2019-05-23 16:58:08 +01:00
John Beard 94b46ce176 QA common: add some BITMAP_BASE tests
Also:

* Init wx image handlers for qa_common
* Break out COLOR4D test predicates
* Fix some bitmap_base.h headers/forwards
2019-05-23 15:19:51 +01:00
jean-pierre charras 83e08c9277 Fix crash in Eeschema when clicking on a menubar item.
It happens if an other frame (libedit) was opened, a menubar clicked, an this frame was closed.
2019-05-23 13:35:12 +02:00
Jeff Young 0047f88f82 Mark unfold bus menu as clean so it doesn't get generated a second time.
Fixes: lp:1829878
* https://bugs.launchpad.net/kicad/+bug/1829878
2019-05-23 00:27:53 +01:00
Seth Hillbrand ac435ecd68 Moving further arc approximations down
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
2019-05-22 14:35:17 -07:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Seth Hillbrand 06b22594ca libedit: Prevent null dereference in popup
Lack of tool manager can happen when the popup is not connected to the
main tool.

Fixes: lp:1829825
* https://bugs.launchpad.net/kicad/+bug/1829825
2019-05-21 19:59:43 -07:00
Seth Hillbrand 490c805319 Allow squared inflation and inflate Eagle Zones
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.

This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline.  KiCad zones are drawn inside the polygon.  We need to both
increase the zone size and decrease the minimum pen width to account for
this.

Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
2019-05-21 13:49:18 -07:00
jean-pierre charras aee1fe45f4 Fix a few issues related to Bitmaps in menus.
- fix missing icons.
- remove duplicate (and incorrect) code to set these icons in wxMenuItems
2019-05-21 17:50:05 +02:00
jean-pierre charras 62a5302bc4 Fix issues created by commit cbb0d74bd5.
This commit redirected too many menuitem IDs to the tool manager.
Only some context menu items have to be redirected, not all inside ACTION_EVENT events.

This hack is not perfect. It needs a better handling of ACTION_EVENT handling.
2019-05-21 12:48:37 +02:00
Jon Evans cbb0d74bd5 Ensure all custom event ids are processed by ACTION_MENU
Fixes: lp:1829759
* https://bugs.launchpad.net/kicad/+bug/1829759
2019-05-20 23:45:22 -04:00
Jon Evans f53c42fac9 Fix another instance of wxGTK not liking menu icons 2019-05-20 20:34:08 -04:00
Jon Evans 95a6fb6ea3 Don't set bitmaps on non-normal menu items under wxGTK
Fixes: lp:1829780
* https://bugs.launchpad.net/kicad/+bug/1829780
2019-05-20 20:11:22 -04:00
jean-pierre charras d701637eab Footprint viewer: Fix crash when truing to open the View menu. 2019-05-20 11:36:58 +02:00
jean-pierre charras c35ec8ae7c Pcbnew: fix crash when opening and closing a context menu, and then trying to open a menu from the menu bar.
Was due to the fact the EVT_MENU_CLOSE capture was missing
2019-05-20 10:56:24 +02:00
jean-pierre charras 97ddefd01a Cosmetic refinement in conditional menu: avoid adding useless separators in menu.
A useless separator is a separator added when no menuitem was previously added.
2019-05-20 10:53:32 +02:00
Jeff Young f21faceb74 A hack to work around wxWidgets failure to capture WX_MENU_OPEN events
See the comments.  It's not pretty, but it works.

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

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

Fixes: lp:1594029
* https://bugs.launchpad.net/kicad/+bug/1594029
2019-05-19 22:04:28 +01:00
Jon Evans ec39bdda77 GerbView: fix saving of canvas type and lingering legacy menu item
Fixes: lp:1829647
* https://bugs.launchpad.net/kicad/+bug/1829647

(cherry picked from commit b00e20b23f)
2019-05-19 16:17:53 -04:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +01:00
Jeff Young 13aa503614 Hack for wxWidgets failure to open menu on MSW. 2019-05-18 00:21:49 +01:00
Jeff Young 1a3d0492f5 Push polar coords down into COMMON_TOOLS. 2019-05-18 00:21:49 +01:00
Jeff Young 48fb78418c Fix merge error. 2019-05-16 20:05:45 +01:00
Jeff Young b4d4525496 Fix icon-scaling issue for ACTION_TOOLBAR.
Fixes: lp:1829291
* https://bugs.launchpad.net/kicad/+bug/1829291
2019-05-16 19:57:06 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Seth Hillbrand ddc6079ceb Move remaining hard-coded segment counts
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
2019-05-16 08:49:55 -07:00
John Beard 8378f97a78 Eeschema: enable grid change hotkey
Add the N/Shift+N hotkeys to the eeschema hotkey file.

Also adjust the COMMON_TOOLS::GridNext/Prev to work when
the screen's grid definitions do not have consecutive command
IDs (they do not in eeschema).

This is related to lp:1811018 (but doesn't constitute a fix).
* https://bugs.launchpad.net/kicad/+bug/1811018
2019-05-16 14:10:43 +01:00
John Beard 0eb8f92c69 Pcbnew: add a step field to the array tool
This is useful, for example, when arraying only one side
of a connector.

Fixes: lp:1809580
* https://bugs.launchpad.net/kicad/+bug/1809580
2019-05-16 11:20:52 +01:00
John Beard 2c1b970027 Arrays: isolate axis code in a new class
Remove the axis numbering code from ARRAY_OPTIONS
and place in a new class, ARRAY_AXIS. This keeps
the logic for the array item numbering separate from
the logic for the array item geometry.

This simplifies the logic in the ARRAY_OPTIONS class, which
no longer has to deal with the numbering of each axis.
2019-05-16 11:20:52 +01:00