Commit Graph

12692 Commits

Author SHA1 Message Date
Maciej Suminski 94dbcc7199 Fixed crash after multiple 'cut' commands in the footprint editor
When multiple cut commands were issued, the cut command handler would
restart multiple times and keep running until the handler that was
invoked first finishes. As all handlers kept a selection copy, they
would try to save the deleted items to the clipboard resulting in a
crash.

Fixes: lp:1761221
* https://bugs.launchpad.net/kicad/+bug/1761221
2018-04-05 00:26:57 +02:00
Seth Hillbrand 6fb47faebd Workaround for IGES import bug in OCE-0.18
This changes the IGES import parameter precision to be file-defined
instead of hard-coded in KiCad.  OCE-0.18 does not handle faces with
a set of points whose approximation creates a single point.

By allowing the file to set the precision level, we leave it to the
generating program to create a file with non-degenerate faces.

Fixes: lp:1738872
* https://bugs.launchpad.net/kicad/+bug/1738872
2018-04-04 13:03:34 -07:00
Seth Hillbrand d1af5210e0 Libedit: Fix a few places where item could be NULL
Fixes: lp:1761058
* https://bugs.launchpad.net/kicad/+bug/1761058
2018-04-04 10:20:15 -07:00
Seth Hillbrand bbb513e2e5 Ensure that we are drawing holes and outlines
Set hole colors in output to non-transparent values.
Ensure holes are traced when drawing drill marks.

Fixes: lp:1646482
* https://bugs.launchpad.net/kicad/+bug/1646482
2018-04-04 10:20:15 -07:00
jean-pierre charras 906b389fab fp editor: minor cosmetic fix in main menu. 2018-04-04 17:40:42 +02:00
Wayne Stambaugh 696ff81dc7 Load correct schematic page layout description file in stand alone mode.
Fixes lp:1678849

https://bugs.launchpad.net/kicad/+bug/1678849
2018-04-04 10:18:12 -04:00
Jeff Young df43f071e1 Keep track of open sockets and dispose of them in d'tor.
Fixes: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
2018-04-04 12:02:40 +01:00
Jeff Young 5e36fe8df7 Move timestamp setting where it will alwasy get set.
Also update the rest of the symbol-chooser usage to current
specs, including examining the timestamp to see if the list
needs loading at all.

Partial fix to: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
2018-04-04 12:02:40 +01:00
jean-pierre charras 70988271c1 WX_TEXT_ENTRY_DIALOG: fix a wxASSERT ( very minor issue in debug mode) 2018-04-04 10:40:27 +02:00
Maciej Suminski 8b21a0a53d Changed PCB_BASE_FRAME::CreateNewModule() to stop adding modules to the board
When a new footprint is created, CreateNewModule() added it to a dummy
board in the footprint editor. If a footprint was indeed created (the
action has not been aborted) then the dummy board was cleared,
destroying the just created footprint. Also, the new footprint is later
added with AddModuleToBoard() call.

Fixes: lp:1761052
* https://bugs.launchpad.net/kicad/+bug/1761052
2018-04-04 09:34:12 +02:00
Jeff Young 2e4f50f206 Make sure segments read from file are in correct order.
Fixes: lp:1752033
* https://bugs.launchpad.net/kicad/+bug/1752033
2018-04-03 22:01:34 +01:00
Maciej Suminski 7943372e8b Refill zones only when required
Previous implementation refilled zones every time they have been
unselected. This patch adds a flag that tracks whether the
zone has been actually modified, so it will be refilled only when
necessary.

Fixes: lp:1760903
* https://bugs.launchpad.net/kicad/+bug/1760903
2018-04-03 22:28:05 +02:00
jean-pierre charras a2f118d2fa Gerbview: fix not working menu item "Zoom to Selection" in main menu. This also fixes a wxASSERT for this menu item 2018-04-03 16:30:16 +02:00
Maciej Suminski 71bf488507 Eagle SCH importer: fixed open-collector pin type, simplified pin direction matching 2018-04-03 14:26:15 +02:00
Maciej Suminski 6d06ed3579 Eagle SCH importer: minor fixes
- set correct reference for components
- handle "pwr" direction for pins
- discarded a redundant variable
2018-04-03 14:26:15 +02:00
jean-pierre charras f8a3ec4974 Add a method to facilitate Tools handling in main frame toolbars.
Fix also a bug in gerbview_frame.cpp, about a broken toolbar accessor (fortunately not used in current code)
2018-04-03 13:00:20 +02:00
jean-pierre charras c867de53b8 Page layout editor: fix a wxASSERT when trying to open view menu from the main menubar.
This is due to the fact the same ID was used for a menuitem in menubar, and a tool in toolbars.
2018-04-03 09:31:52 +02:00
Wayne Stambaugh 747e14f9e1 Fix broken link in compiling.md. 2018-04-02 18:27:37 -04:00
Wayne Stambaugh 4b2ced341e Fix button sizer padding in WX_TEXT_ENTRY_DIALOG. 2018-04-02 18:05:37 -04:00
Wayne Stambaugh 53b1ec8146 Fix track posture hotkey bug on windows.
The change track posture hotkey '/' was getting interpreted as the show
hotkey list shortcut '?' on windows.  This fix is temporary hack to fix
the problem which much more involved than the simple #ifdef/#endif used
to fix this issue.

Add key code tracing to help analyze key codes for future development.
2018-04-02 18:05:37 -04:00
Jeff Young d391489596 Don't clear old footprint till after user has hit OK.
Fixes: lp:1759190
* https://bugs.launchpad.net/kicad/+bug/1759190
2018-04-02 22:32:09 +01:00
Jeff Young f4c972db5e Name the Get and Move Footprint dialog to match the command.
Fixes: lp:1760635
* https://bugs.launchpad.net/kicad/+bug/1760635
2018-04-02 20:16:26 +01:00
Russell Oliver 89381e1103 Eagle Import: Correct layer set based on cream setting and rotate rectangles
Fixes: lp:1758747
* https://bugs.launchpad.net/kicad/+bug/1758747
2018-04-02 10:59:54 -07:00
Seth Hillbrand ee05b1c92e Add polygon arc support to Eagle import 2018-04-02 10:49:43 -07:00
Seth Hillbrand 532bf09817 Don't save broken polygon
If a polygon has fewer than 3 points, it is invalid.  We need to
register this as failure, otherwise we save the formatting/closing
s-expr for the polygon without the actual polygon points. This breaks
the footprint and board.
2018-04-02 10:18:10 -07:00
Maciej Suminski dd56f16776 Fix symbol editor crash when modifying fields while a field is selected
Field Editor dialog calls LIB_EDIT::SetFields() that deletes the old
LIB_FIELD objects and creates new ones. If any of the old LIB_FIELD
objects had been selected before invoking the dialog, then one of the
update UI event handlers will crash trying to access the object.
2018-04-02 17:51:11 +02:00
jean-pierre charras 0171547154 Context menu: use same message for Zoom and Grid in Legacy mode and GAL mode.
a minor cosmetic other fix in Eeschema, edit submenu.
2018-04-01 21:09:52 +02:00
jean-pierre charras e750417fa0 Eeschema: fix many wxASSERT when trying to open menus from the main menubar.
This is due to the fact the same ID was used for menuitems in menubar,
and tools in toobars.
Especially, some items were not compatible due to different attributes.

Windows does not accept the same ID for 2 items inside the same frame.
It creates issues (items not shown, Asserts, ...)
2018-04-01 20:58:27 +02:00
jean-pierre charras 54f14b08ca commit forgotten change in my previous commit 2018-03-31 18:46:29 +02:00
jean-pierre charras fa39acfc2f Gerbview, export to pcbnew : export polygons as new DRAWSEGMENT polygonal shape.
It can creates issues on copper layers, but the only one other alternative is to ignore polygons in export,
and this is worst.
2018-03-31 18:43:12 +02:00
jean-pierre charras 5b8c35f64d Gerbview: minor fix: do not report error if in header INCH ot METRIC command has no parameter (,LZ or ,TZ format)
I am not sure it should be reported, because LZ or TZ format has no meaning in decimal format, and can be omitted.
2018-03-31 18:40:29 +02:00
jean-pierre charras 62c5a706d5 DIALOG_GRAPHIC_ITEM_PROPERTIES: fix a not very understandable error message (especially when Dwgs.User layer is disabled).
Rename the method PCB_LAYER_BOX_SELECTOR::SetLayerSet to the better name SetNotAllowedLayerSet
2018-03-31 10:46:52 +02:00
Jon Evans b813eac254 Omit unnecessary scripts directory from MacOS build output 2018-03-30 22:56:51 -04:00
Jon Evans e3d9a23867 Properly escape urls passed to wxLaunchDefaultBrowser() 2018-03-30 22:02:13 -04:00
Seth Hillbrand 62fe78f08c Eeschema: Simplify GetItem
Avoids calling HitTest on each item when it is not needed
2018-03-30 17:26:34 -07:00
Seth Hillbrand 8bb9084ea9 Revise TestSegmentHit to catch missing hits
Fixes issue where TestSegmentHit falsely skips segments that are
slightly off 45°. Improves speed of function by exiting on non-hits
more quickly. Simplifies function and removes magic numbers.
2018-03-30 17:26:34 -07:00
Seth Hillbrand 7d3d9f7188 Wrapping left-over debug printf() in DBG() 2018-03-30 16:17:29 -07:00
Seth Hillbrand 2e0b75c058 Remove internal CheckCXXSymbolExists
Since Cmake 2.8.6, Cmake provides this macro.  Our use references
internal Cmake variables that have changes in Cmake 3.11.
2018-03-30 14:47:16 -07:00
Maciej Suminski 7483a73a5f Set OK button as the default one in WX_TEXT_ENTRY_DIALOG
Enables accepting the input by pressing the Return key.
2018-03-30 15:29:48 +02:00
Jon Evans b8c282fa6f Don't complain about perfectly-closed polygons as self-intersecting 2018-03-29 22:20:00 -04:00
Jon Evans 081c77f6bd OPENGL_GAL::DrawSegment(): Enforce nonzero width to match Cairo
Fixes: lp:1759958
* https://bugs.launchpad.net/kicad/+bug/1759958
2018-03-29 22:13:46 -04:00
Jon Evans 1ec217d70e Fix hit testing for zero-width gerber items 2018-03-29 22:04:51 -04:00
Seth Hillbrand 7c70e969db Prevent warning when renaming sheet name
Renaming a subsheet but keeping the filename should not present a
warning to the user.  The was triggered due to comparing a
fully-qualified filename to a relative filename.

Fixes: lp:1744475
* https://bugs.launchpad.net/kicad/+bug/1744475
2018-03-29 13:51:02 -07:00
Seth Hillbrand 4917540069 Clarify timestamp type for wxDateTime 2018-03-29 09:29:05 -07:00
Maciej Suminski eb9099238a Eagle SCH import: Improved net label placement algorithm
Eagle support net labels that are naming wires not directly connected to
the labels. In KiCad it is not possible, therefore such detached net
labels need to be moved, so they touch the corresponding wire.

The initial algorithm did not take into account that a moved net label
might be placed on a wire crossing, effectively shorting two nets. This
commit improves the placement algorithm by avoiding the wire crossing
points when placing a label.

Fixes: lp:1748502
* https://bugs.launchpad.net/kicad/+bug/1748502
2018-03-29 12:16:11 +02:00
Maciej Suminski 88915f7940 SCH_EAGLE_PLUGIN::addBusEntries(): prevent operating on deleted objects 2018-03-29 12:11:36 +02:00
Maciej Suminski 168112cf84 SEG: added Center() method 2018-03-29 12:11:35 +02:00
Maciej Suminski 99e79c077a Eagle SCH import: Code formatting 2018-03-29 12:11:35 +02:00
jean-pierre charras 0f0d9afa66 Pcbnew, legacy mode: fix ratsnest display artifacts when finishing or removing a track 2018-03-29 09:28:41 +02:00
Seth Hillbrand d1ab62fb4d pcbnew: Save only edited footprint when saving
Don't re-save all files in a library when editing a single footprint.
This creates issues with formatting in version control systems where
unmodified files are re-written without being explicitly changed by the
user.

Fixes: lp:1752991
* https://bugs.launchpad.net/kicad/+bug/1752991
2018-03-28 14:42:32 -07:00