Commit Graph

9037 Commits

Author SHA1 Message Date
Oleg Endo 137fe48d88 rewrite select net dialog 2020-04-21 13:23:56 +00:00
Oleg Endo 2f1d23312f add BOARD_CHANGED and UNITS_CHANGED events 2020-04-21 13:23:56 +00:00
Oleg Endo 7bf8a744f1 add support for board listeners 2020-04-21 13:23:56 +00:00
Oleg Endo e3aec20f82 move PCB_INSPECTION_TOOL::ListNets into pcb_inspection_tool.cpp, split out dialog_select_net_from_list.h 2020-04-21 13:23:56 +00:00
Oleg Endo 4c7471eb79 add more constness to connecivity algo
also make ForEachAnchor inlineable, like ForEachItem.
remove some unused function declarations.
2020-04-21 13:23:56 +00:00
Oleg Endo 3de5b98316 improve performance of CONNECTIVITY_DATA::GetNetItems
- CN_CONNECTIVITY_ALGO::ForEachItem
move implementation to header, so that a lambda can be inlined by the
compiler.  improves iteration performance x2

- CN_ITEM::Net
move implementation to header, so that it can be inlined by the
compiler.

- CONNECTIVITY_DATA::GetNetItems
don't use std::set to filter out duplicates.  use std::unique on sorted
vector.  use a bitset to perform type check.
2020-04-21 13:23:56 +00:00
jean-pierre charras 83cb9c0d14 Fix a few Coverity and compil minor warnings. Remove dead code 2020-04-21 12:47:48 +02:00
Ian McInerney e57c495d05 Fix remaining python method name error
The method was renamed to SetTextThickness in
9c8941e040.
2020-04-20 23:24:55 +01:00
Matt Huszagh 300de7e74c fix footprint wizard for rename from SetThickness to SetTextThickness 2020-04-20 22:09:41 +00:00
Johannes Pfister e5042a46ba Add ability to set SVG plot units and precision
ADDED: Ability to set SVG to metric or imperial units
and made it possible to change the size of a step
2020-04-20 22:02:03 +00:00
Ian McInerney a23747c640 Cleanup the menu processing in the pcbnew layer widget 2020-04-20 22:43:55 +01:00
nopeppermint 0580b60ec1 add Show All Inner Layer button to layer selector 2020-04-20 19:54:26 +00:00
Jeff Young 7f1b409305 Remove dead legacy print code. 2020-04-20 17:03:38 +01:00
Jeff Young dce42612d3 Fix via printing.
LAYER_VIAS needs to get set for them to print at all, and GetLOD
needs too look at the view layer visibiilties, not the board layer
visibilities.

Also implements a more pad-like strategy for printing blind/buried
vias when printing one layer per page (where the top/bottom arcs
don't make sense).

Fixes https://gitlab.com/kicad/code/kicad/issues/1938
2020-04-20 17:02:38 +01:00
Stefan 02bdec1c57 Pcbnew: Fix wrong show front/back layer icons in layer selector 2020-04-19 22:56:30 +00:00
Michael Kavanagh 7db355e34a ADDED: TOOL_ACTION for switching PNS router mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/2249
2020-04-19 22:44:05 +00:00
Jeff Young b2cd66f0a3 Add specific selection updating when adding 3D models.
This keeps us from being at the receiving end of wxWidgets' vagaries.

Fixes https://gitlab.com/kicad/code/kicad/issues/3760
2020-04-19 22:42:27 +01:00
Jeff Young 7e4d255cdd Apply Scintilla hack to get auto-sizing canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-19 20:09:43 +01:00
Jeff Young c08a6adb2a Implement GUI and file R/W for 3D model opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/2087
2020-04-19 18:24:39 +01:00
jean-pierre charras d28fea5502 Dxf import: fix a bug that disable import of data inside blocks
Provide also a minimal debug info when enabled in code (and only in debug version)
2020-04-19 13:41:54 +02:00
Ian McInerney 7bda8178d1 Move library includes to main CMake file
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
Jeff Young 895f46da8f Another attempt to fix the textbox scrollbars on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-18 21:41:20 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Stefan 8abe07f6e7 altium importer: Fix size of record
Previous size led to incorrect import of some boards.

From https://gitlab.com/kicad/code/kicad/-/merge_requests/172
2020-04-18 01:00:11 +00:00
Ian McInerney 3b67e3d0a4 Rewrite window positioning logic
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.

CHANGED: Window position on startup should be preserved more
2020-04-18 00:47:38 +01:00
Seth Hillbrand 6af21703fe P-CAD: Support Rounded Rect import
The P-CAD import supports rounded rectangles but doesn't allow
modification of the radius.
2020-04-17 10:48:37 -07:00
Thomas Pointhuber 2703bd6b81 alitum: set layer name, fix handling of odd layercount 2020-04-17 11:06:55 +00:00
Thomas Pointhuber ff5a0f61b2 altium: trim property string to avoid things like spurious newline characters 2020-04-17 11:06:55 +00:00
Thomas Pointhuber a29e55fe7e altium: Fix handling of odd layercount (otherwise, saved *.kicad_pcb file would no longer load) 2020-04-17 11:06:55 +00:00
Jeff Young cb708aaadb Fix some memory leaks. 2020-04-16 21:57:07 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Michael Kavanagh 7513303cf4 Remove pad properties wxNotebook background
Fixes https://gitlab.com/kicad/code/kicad/issues/3920
2020-04-16 15:06:43 +00:00
Mikołaj Wielgus 5049214f33 Pcbnew statistics: remove horizontal margin in drill table
This margin caused a horizontal scrollbar to appear on Debian Buster
Xfce.
2020-04-16 12:58:02 +00:00
jean-pierre charras e1af9df83e Pcbnew, legacy_plugin.cpp: fix broken conversion of pad layers.
Fix also incorrect copper layer count setting
2020-04-16 14:40:51 +02:00
Simon Richter 5aac36dba9 New enum for trace selection mode
This avoids giving KICAD_T another meaning, which is especially messy here
as "select up to the next via" is encoded as SCH_JUNCTION_T, which belongs
to eeschema.

Also, document what is happening.
2020-04-15 11:17:51 +00:00
Tomasz Wlostowski 4a3cd77416 router: smarter way to check the shove direction without using silly heuristics 2020-04-15 13:00:48 +02:00
Tomasz Wlostowski c121f8f52c pcbnew: speed up ZONE_CONTAINER bounding box calculation 2020-04-15 13:00:48 +02:00
jean-pierre charras 5143f87678 Kicad2step: Many fixes in oce_utils.
- Better code and messages.
- Speedup calculations when removing cutouts and holes from main board.
- Do not stop step generation when trying to load a 3D modele having issues.
2020-04-15 11:44:12 +02:00
jean-pierre charras b68bdc22d7 Fix in kicadpcb reader. Update dialog export step
kicad2step: code cleanup, and more activity messages displayed
2020-04-15 10:51:35 +02:00
jean-pierre charras 110b05fe78 kicad2step: convert it from a wxAppConsole to a wxApp, using a wxFrame/wxPanel 2020-04-15 10:51:35 +02:00
Ian McInerney 45dabde68e Small cleanup in zone class 2020-04-14 18:00:09 +01:00
Ian McInerney 37a4dd927b Allow deletion of zone cutout areas
ADDED: Ability to delete zone cutout areas

Fixes https://gitlab.com/kicad/code/kicad/issues/4188
2020-04-14 17:57:47 +01:00
Ian McInerney 7068b6453e Fix latent bug in zone area calculation
The filled polygons don't have holes, so this was never hit,
but it still needs to be fixed.
2020-04-14 17:32:47 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
jean-pierre charras bdada70ee7 Cosmetic enhancements: add bitmaps to a few context menus.
Fix also a minor compil warning.
2020-04-12 10:29:28 +02:00
Jeff Young 350696ecdd Only convert references to KIIDs if the variable resolves.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young 505d8bf56e Allow ':'s in field name references in text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young a8b025ab06 Fix "show" column label. 2020-04-11 13:02:18 +01:00
jean-pierre charras 096564ec0c Fix some typos and I18n issues 2020-04-11 08:57:46 +02:00
Jeff Young 174856bac5 Promote 3D model "preview" flag to a persisted "show" flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/2061
2020-04-10 22:49:56 +01:00
Jeff Young 84944524cc Fix crash on OSX when page was changed before hack array was alloc'ed. 2020-04-10 22:49:56 +01:00
jean-pierre charras dac78d2562 fix a few minor Coverity warnings. 2020-04-10 18:28:12 +02:00
jean-pierre charras 2c8ada42a0 Arc shaped track segments: fix 3D viewer and track to polygon converter. 2020-04-09 10:37:17 +02:00
Jeff Young e016b629d3 Be smarter about determining if there are modules in the selection list.
The old algorithm would delete modules if another module was in the
list, which was not the intention.

Fixes https://gitlab.com/kicad/code/kicad/issues/4175
2020-04-09 00:06:17 +01:00
Jeff Young 317e98b344 Simplify user model for editing color themes. 2020-04-08 22:34:56 +01:00
jean-pierre charras c877cb967f Arc shaped track segments: fix plotters and export vrml.
Export Hyperlinx is not fixed.
2020-04-08 17:30:20 +02:00
Simon Richter 0c2d081925 Remove unused class and friend declarations
This forward declaration doesn't match the class defined inside the
function, so the friend declaration does nothing. The friend declaration is
also unneeded, because the function is a member of the class (and so are
types defined within it), so these already have access to private members.
2020-04-07 22:14:39 +00:00
Jeff Young 840cab4eec Allow user to show layer if DRC object is hidden.
Fixes https://gitlab.com/kicad/code/kicad/issues/3686
2020-04-07 17:29:58 +01:00
Jeff Young aba0fa7bf8 Allow cross-referencing text substitutions. 2020-04-07 17:29:58 +01:00
Jeff Young 76bbb71402 Correct some formatting issues. 2020-04-07 17:29:58 +01:00
Thomas Pointhuber 05d070a0c9 altium: update to new string replacement variables 2020-04-07 14:52:55 +00:00
Thomas Pointhuber 13eb4d73da altium: fix segfault due to incorrect check 2020-04-07 14:52:54 +00:00
Thomas Pointhuber a433d9ea55 altium: improve property reading code, do not rely on exceptions 2020-04-07 14:52:54 +00:00
Jeff Young 322ab60cc5 Fix some Coverity issues. 2020-04-06 12:31:59 +01:00
Simon Richter 710e93bc53 Drop <zconf.h> include
It doesn't seem to be required, and it makes the directory depend on
zlib.
2020-04-05 23:34:13 +00:00
Ian McInerney cb380cda0c Fix some build warnings 2020-04-06 00:31:45 +01:00
Jeff Young 7bce0e17f2 Refresh netlist popups after import settings from.
Fixes https://gitlab.com/kicad/code/kicad/issues/4075
2020-04-06 00:05:34 +01:00
Jeff Young 9a258df58a Fix layout issues in Gen FP Positions dialog and add text var support.
Also adds text var support to Export SVG dialog.
2020-04-05 23:56:24 +01:00
Jeff Young b13559c926 Add envVar and text variable resolution to plot directory paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/3808
2020-04-05 23:56:24 +01:00
Thomas Pointhuber 78159c6744 Altium importer bug fixes
altium: add missing "layer name" -> "layer" mapping
altium: some coverty fixes towards file reading
altium: improve zone handling, fix coverty issues
2020-04-05 22:26:29 +00:00
Jeff Young cc9ac37a0e Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
Ian McInerney 4ff61318af Push pcbnew grid visibility storage into EDA_DRAW_FRAME
Fixes https://gitlab.com/kicad/code/kicad/issues/4154
2020-04-05 18:49:10 +01:00
jean-pierre charras 5097d14875 More about do not mark translatable strings used in debug messages. 2020-04-05 14:10:06 +02:00
jean-pierre charras 34651693c1 Altium importer: more about do not mark translatable strings used in debug messages. 2020-04-05 13:45:55 +02:00
jean-pierre charras 70afd12524 Altium importer: do not mark translatable some strings used in debug messages. 2020-04-05 11:22:52 +02:00
Ian McInerney 0dac0c9a47 Cleanup some dynamic casts
From Coverity scan
2020-04-04 12:41:45 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
Jeff Young 78dfbca9a3 Save pre-eval values for Move Exactly dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/4088
2020-04-03 21:47:47 +01:00
Wayne Stambaugh 082944ad06 Minor build warning fixes. 2020-04-03 13:03:23 -04:00
Ian McInerney de66c65f3c Don't immediately read back clipboard data on OSX
This causes an ASAN error because something in the wx
clipboard cache is incorrect (so it tries to copy more
data than it has available). Closing the clipboard and
reopening to read works (since close clears the cache).
2020-04-03 15:54:09 +01:00
jean-pierre charras 161b73e55b Enable storing pin function (pin name) in pads.
This is useful in board routing.
It is plotted in pad attribute TO.P in Gerber files.
2020-04-02 20:14:45 +02:00
Jeff Young b59da3e4dc Overridden versions of GetShownText() still need to call EDA_TEXT version.
Fixes https://gitlab.com/kicad/code/kicad/issues/4151
2020-04-02 18:27:54 +01:00
jean-pierre charras 25fb2595c8 Fix fully broken selection of items of the same sheet, in pcbnew and from eeschema.
Previously, the full UUID path used to select footprints was full broken.
2020-04-02 14:21:09 +02:00
jean-pierre charras ffe0b4aba1 Fix a few Coverity warnings. 2020-04-02 14:21:09 +02:00
jean-pierre charras ddb7b2b2b7 pns router: fix possible hang when using "end" key to finish the current track.
Add also left double click (same as "end" key) to finish the track.

Fixes #4116
https://gitlab.com/kicad/code/kicad/issues/4116
2020-04-02 14:21:09 +02:00
Ian McInerney 0d79ada3ec Show the pencil cursor when placing an item, but it isn't created yet 2020-04-01 18:24:58 +01:00
Ian McInerney 4b647ba6b1 Refactor microwave parts into the microwave tool 2020-04-01 18:24:31 +01:00
jean-pierre charras e811101567 fix a few Coverity warnings. 2020-04-01 09:34:44 +02:00
jean-pierre charras 3a107e5484 Better generation of drill maps in PS, PDF, SVG formats.
These formats use a defined page size (currently A4), and therefore
the drill list cannot be outside the page.
When there are a lot of drill diameters it can happen.
Now the long lists are plotted on more than one column.
2020-03-31 16:48:03 +02:00
Jeff Young 13d3f57fce Implement a different solution to refreshing lib trees.
Fixes https://gitlab.com/kicad/code/kicad/issues/4110
2020-03-31 02:09:31 +01:00
Jeff Young 41b5872f12 Add ERC & DRC checks for unresolved variables. 2020-03-30 14:15:59 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
Jon Evans 34aee50ae1 Rework plotting colors to ensure color settings are always available 2020-03-29 21:43:18 -04:00
Michael Kavanagh 570ea62b64 Fix discrepancy between ASCII and CSV fp pos files
Fixes https://gitlab.com/kicad/code/kicad/issues/3897
2020-03-29 16:55:01 +00:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
jean-pierre charras 259d7a47d4 Pcbnew: enhancements:
Plot Gerber format default values:  X2 attributes enabled.
Gerber job file: use a trick to truncate floating values to 4 digits in mantissa.
It gives a much better readability and 0.1 micron is enough for
mechanical dimensions
2020-03-29 15:35:47 +02:00
Jeff Young 5134856f18 Rationalise 3D settings data-structure.
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.

At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
jean-pierre charras 3e247a70d5 Gerber plot: new algo to generate solder mask layers with non 0 min thickness mask
Previously, all overlapping polygons (pads and min thickness areas to remove) were
merged.
Drawback: pads attributes are lost. In Gerber this is annoying.
Now the pads are plot as flashed or Regions items, and min thickness areas are added
but shapes are not merged and keep their attributes.
2020-03-28 16:32:46 +01:00
jean-pierre charras 74957bc7e3 Footprint editor: re-enable a internal copper layer to add/edit keep-out zones
on internal layers in footprints.

Fixes #4096
https://gitlab.com/kicad/code/kicad/issues/4096
2020-03-26 16:53:46 +01:00
Jeff Young ba36fc0009 Fix some Coverity issues. 2020-03-25 14:38:43 +00:00
Jon Evans 18ad186b99 Fix plotting without Pgm context 2020-03-24 21:45:58 -04:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
jean-pierre charras 5f60d955be minor fix for commit eb250b4cb 2020-03-24 18:43:15 +01:00
jean-pierre charras eb250b4cb0 PCB_PAINTER: minor fix: display better pad shapes on solder paste layers.
the parameter margin percent was badly handled for rectangular/oval pads,
giving an incorrect solder paste shape for non 0.0 values
now it is is correctly handled.
2020-03-24 18:29:12 +01:00
jean-pierre charras cc47062b17 Fix a few Coverity issues 2020-03-23 16:17:22 +01:00
jean-pierre charras 4d9d1a5380 Fix a few compil minor warnings and Coverity minor issues 2020-03-22 09:45:51 +01:00
Jeff Young 93b7eacfb2 Fixup some Coverity issues. 2020-03-21 16:32:22 +00:00
jean-pierre charras 9cb3333d05 Gerber plotter: plot round rectangle pads using a region with arcs.
Previously, the region was a usual polygon with arc approximated by segment.
Using a region with arcs is a better way because it allows CAM tools to
identify this region as a round-rect pad.

A side effect is a better shape and smaller files, however not really noticeable in fact.
2020-03-20 19:45:05 +01:00
Jeff Young e9cd9ee8ff Actionize the rest of the 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/2228
2020-03-19 15:10:32 +00:00
jean-pierre charras 64d217edda drc.h: replace a list of #define by an enum.
Due to changes in code, the reason for using #define does not exist
since a long time.
2020-03-18 10:19:46 +01:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young 847de9143e Add some tooltips.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 22:43:16 +00:00
Jeff Young 3b97993daf Another attempt to fix offset issues when pasting board items to ModEdit.
Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-16 18:45:55 +00:00
Wayne Stambaugh 7dc64f08b7 Eeschema: implement s-expression schematic file formatter.
Please note that the symbol cache is not embedded in the schematic file
to allow for round robin testing with the existing file format.  Once
the parser round robin testing is complete, the symbol cache will be
embedded in the schematic file.
2020-03-16 09:05:16 -04:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 222b222299 Improve ease of understanding around PCB <-> schematic links.
Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 11:06:15 +00:00
jean-pierre charras 1e40753d33 FOOTPRINT_EDIT_FRAME: fix missing saving/loading a few config params. 2020-03-15 19:51:41 +01:00
jean-pierre charras 76b64afc26 ZONE_CONTAINER copy ctor: add missing members in copy code.
Fixes #4050
https://gitlab.com/kicad/code/kicad/issues/4050
2020-03-15 09:39:42 +01:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
jean-pierre charras 741783c6d1 Pcbnew: Set default solder mask min size to 0.
When the solder mask min size is > 0, pads are no longer flashed or regions items.
Good Gerber files need pads flashed or regions items.

Non 0 solder mask min size is reserved to special cases (home made PCBs for instance)
2020-03-12 20:05:08 +01:00
jean-pierre charras 78a7c7dfe0 Zones: fix a crash when adding a zone cutout to a zone having already holes.
Fixes #4039
https://gitlab.com/kicad/code/kicad/issues/4039
2020-03-12 14:42:32 +01:00
Seth Hillbrand 61704cb508 Initialize missing variable 2020-03-11 15:24:08 -07:00
jean-pierre charras fbd01f2f7d DRC_TREE_MODEL: Fix incorrect display of DRC errors on linux+wxGTK 3.0
Fixes #4038
https://gitlab.com/kicad/code/kicad/issues/4038
2020-03-11 10:46:08 +01:00
Jeff Young 51b9944667 Fix pasting of items from board to Footprint Editor.
In particular, map the netlist info to the orphaned item, and
adjust the position of module graphic items to no longer be
module-relative.

Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-10 23:07:01 +00:00
Jeff Young 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Ian McInerney f079c41118 Prevent the board setup dialog from opening when DRC is open
The board setup dialog controls DRC error visibility, so the
two dialogs shouldn't be open at the same time to prevent
data contention.

Follow-up to https://gitlab.com/kicad/code/kicad/-/issues/4023
2020-03-08 15:55:14 +00:00
jean-pierre charras c3beeac977 fix a minor wxWidgets alert. 2020-03-08 10:53:36 +01:00
Ian McInerney 67678faa11 Make the board setup window quasimodal
By making it quasimodal, it allows the main KiCad window and Eeschema
to be used still, if it were just modal then it blocks out all other
windows.

Fixes https://gitlab.com/kicad/code/kicad/issues/4023
2020-03-07 19:29:18 +00:00
Jeff Young 1e4ae5d526 Bug fix for DRC tree view on MSW. 2020-03-07 18:52:30 +00:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Seth Hillbrand 4dfe630b28 PNS: Moving the rest of the placer to Fix/Commit
Springback introduced a new PNS structure to check for valid placement
as well as separating the Fix/Commit routines.  This updates the
remaining placers to utilize the new structure.

Fixes https://gitlab.com/kicad/code/kicad/issues/4008
2020-03-06 09:56:44 -08:00
Seth Hillbrand f6317fba82 PNS: Protect drag from null deref
Items that do not have nets will not be in the index, so we need to
avoid the null pointer when adding drag tagets

Fixes https://gitlab.com/kicad/code/kicad/issues/4009
2020-03-06 09:32:04 -08:00
Jeff Young 44b8bb8f60 Fix a bug when deleting DRC markers from their child items. 2020-03-06 16:23:44 +00:00
Jeff Young fe3e0307d8 Move sheet name and filename to SCH_FIELD architecture.
Only internal storage architecture has changed (so far).
2020-03-06 16:23:44 +00:00
Jeff Young 2f17cbf242 Flag known DRC violations and exclusions in Plot dialog. 2020-03-06 16:23:44 +00:00
Seth Hillbrand 058fb3afa1 PCAD: Handle mirrored text
Mirrored text rotates clockwise in the mirror, so we need to invert the
sign for aligning mirrored PCAD text

Fixes https://gitlab.com/kicad/code/kicad/issues/3992
2020-03-05 15:29:02 -08:00
Seth Hillbrand 0417a6b409 PNS: Fix missing via on zero-length
The current node needs to be kept for zero-length lines when placing a
via.

Fixes https://gitlab.com/kicad/code/kicad/issues/4005
2020-03-05 15:02:40 -08:00
Seth Hillbrand 3d151ebd71 Cleanup connectivity parts
Removes unneeded casts from the connectivity algo.
2020-03-05 12:41:54 -08:00
Seth Hillbrand b0d9838fb4 PNS: Correct assertion when dragging
Dragging using highlight caused an assertion as the duplicated lines
were being re-added with their old links still inplace.  While this was
probably fine as the link references shouldn't be stale, we clear them
to allow for the possibibility that the dragger will adjust the links in
the future.
2020-03-05 08:47:06 -08:00
Seth Hillbrand 4c2626f6b0 PNS: Don't use PNS margin to calc bump direction
The bump direction should only be concerned with physical points to
calculate the heuristic for loop-back otherwise we get too many false
positives.

Fixes https://gitlab.com/kicad/code/kicad/issues/3971
2020-03-04 19:22:57 -06:00
Seth Hillbrand fe8524b9bb Update DIFF_PAIR_PLACER to new callbacks
Needs to handle changes to PNS_ROUTER.  This does not implement
springback or backspace in DIFF_PAIR_PLACER, only allows committing
lines as before

Fixes https://gitlab.com/kicad/code/kicad/issues/3988
2020-03-04 17:23:04 -06:00
Seth Hillbrand ecbfea68dd ADDED: Allow creation of nets in pcbnew
When editing pcb items, the creation of a new net to connect existing
pads or traces can be a useful shortcut.  This inserts the ability to
optionally create a new net from the Net Selector dropdown menu.
2020-03-04 16:11:47 -06:00
Jeff Young 2359d19cf4 Add menu item to DRC dialog to go to Board Setup / Violation Severities. 2020-03-04 21:52:30 +00:00
Jeff Young d20f36511f Fix issue with severities not get initialised in DRC_TREE_MODELs. 2020-03-04 21:52:30 +00:00
Jeff Young 0894674869 Save severities settings in the DRC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/3978
2020-03-04 21:52:30 +00:00
Seth Hillbrand 12088f240d Fix a couple crashes with small canvases
The canvas size is not guaranteed to be strictly > 0, so we need to
enforce a minimum returned size before dividing by it or passing to GAL
initialization
2020-03-04 14:33:42 -06:00
Seth Hillbrand 011e4116d6 Remove assertion path on closing empty pcb
We don't need to save the project settings if we don't open a file or
project
2020-03-04 11:40:28 -06:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Michael Kavanagh 265c1663f9 Remove empty choice in Via type dropdown
Fixes https://gitlab.com/kicad/code/kicad/issues/3968
2020-03-03 22:12:04 +00:00
Seth Hillbrand d4cbc348de PNS: avoid committing route with nothing
The node is not neccesarily populated when committing, so we need to
check for validity first.

Fixes #3984 | https://gitlab.com/kicad/code/kicad/issues/3984
2020-03-03 14:02:32 -08:00
Seth Hillbrand 9769e1020b PNS: Don't link unroutable items
The joint map only works for items that are routable, so don't bother
adding unroutable items as this only takes additional time to process

Fixes #3976 | https://gitlab.com/kicad/code/kicad/issues/3976
2020-03-03 12:42:56 -08:00
Seth Hillbrand d6706c257c PNS: clear via when fixing route
When fixing the route, we need to clear the via to avoid re-placing it
on each future click.

Fixes #3966 | https://gitlab.com/kicad/code/kicad/issues/3966
2020-03-02 16:22:34 -08:00
Seth Hillbrand 386147628e PNS: Initialize placement test 2020-03-02 16:22:34 -08:00
Andrew Downing a8dea9274f modify behavior of position relative tool
CHANGED: The reset buttons now set the X or Y offset to the current
offset from the reference position. Selecting individual pads as the reference item is now also possible.
2020-03-02 20:55:06 +00:00
Seth Hillbrand 842d680b5e Set Module Editor flag for tools
The commit takes the module edit flag when resetting the tool.  All
tools should reset this flag when we setup the Module editor.

Fixes #3973 | https://gitlab.com/kicad/code/kicad/issues/3973
2020-03-02 12:45:34 -08:00
Seth Hillbrand 3c19704349 PNS: Don't add null items to drag
Not all footprint pad items are connected to elements in the PNS, so if
we don't find the parent element, we avoid later crashes/assertions by
skipping their addition

Fixes #3972 | https://gitlab.com/kicad/code/kicad/issues/3972
2020-03-02 11:28:14 -08:00
Seth Hillbrand 18db471967 PNS: Line placer returns false when nothing committed
The true/false return should be triggered on whether any elements have
been commited to the line

Fixes #3969 | https://gitlab.com/kicad/code/kicad/issues/3969
2020-03-02 11:11:13 -08:00
jean-pierre charras 911c6eb781 Pcbnew, DIALOG_NETLIST: fix incorrect storage of wx_MessageWindow options.
Config values were not stored into the right variables.

Make also an option persistent during the session
in DIALOG_UPDATE_PCB and DIALOG_NETLIST

DIALOG_UPDATE_PCB and DIALOG_NETLIST match options: use same order in dialogs.
2020-03-01 20:49:56 +01:00
Jon Evans 90bd351807 Properly flush color settings after migration
Also fix missing gerbview migration

Fixes #3965
2020-02-29 21:49:35 -05:00
Simon Richter 866aac9737 Clean up a few unused names of caught exceptions 2020-03-01 00:33:45 +00:00
Tomasz Wlostowski a28f58d14d router: fix regression in PNS_KICAD_IFACE treating newly created items as invisible (side effect = non-45 degree angles due to incorrect snapping) 2020-02-29 20:41:31 +01:00
Tomasz Wlostowski 6850067182 router: commit traces made in single stroke/click (fixes regression introduced with Backspace support) 2020-02-29 20:40:19 +01:00
jean-pierre charras 2a026bd882 spread_footprints.cpp: try to avoid integer overflow when spreading footprints.
In rare cases (one known case) sizes of areas used as container when spreading
footprints can become negative, thus hanging pcbnew.
Happens if many footprints are very big (say 80cm).

Now if there is no room to place footprints, some are stacked.
2020-02-29 17:25:52 +01:00
jean-pierre charras e37c9f117d Fix memory leak when loading a 0 degrees arc in footprint 2020-02-29 17:20:37 +01:00
Andrew Downing 2f7ac2b5b4 Don't truncate polar coordinates in position relative dialog/move exact dialog 2020-02-29 02:21:18 +00:00
Seth Hillbrand 3e0ff72720 Drop invalid arcs on footprint load
In the case where the footprint arc has a non-normal angle, we cannot
represent this in pcbnew and it corrupts the gerber output.  Therefore
we drop the invalid arc and continue to load the footprint/board.

Fixes #3918 | https://gitlab.com/kicad/code/kicad/issues/3918
2020-02-28 15:02:17 -08:00
Tomasz Wlostowski e5fff302a3 router: fix arc drawing in ROUTER_PREVIEW_ITEM 2020-02-28 23:52:33 +01:00
Tomasz Wlostowski e0bad936bf router: enable inline dragging of components 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 44905e1b0a router: initial support for dragging components with traces attached 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski b2b1edbcd1 router: KICAD_IFACE can now commit changes to module positions 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski b6e059f018 router: use a common base class for all dragging algorithms 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 1d0ee66187 router: kill debug printf() 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 77478014d8 router: kill some warnings in OPTIMIZER 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 796aec6e6e router: SOLID::SetPos() should update the shape position too 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 5a16fda11a router: allow modification of SOLIDs in PNS::NODE 2020-02-28 23:17:15 +01:00
Seth Hillbrand 7cb3ed456e PNS: No free-angle drag at the moment.
Fixes #3954 | https://gitlab.com/kicad/code/kicad/issues/3954
2020-02-28 12:43:59 -08:00
Seth Hillbrand 84b1ab7ce0 PCad: Handle arbitrary PCad layer numbers
KiCad is limited to 32 signal layers but PCad can number the layers
higher than this.  Instead of a C-style array, we now hold the layer
numbers in a std::map to support arbitrary numbering.

Fixes #3949 | https://gitlab.com/kicad/code/kicad/issues/3949
2020-02-28 11:48:06 -08:00
Jon Evans 9cc5b4b3f9 Fix management of nested settings for PNS 2020-02-27 22:53:00 -05:00
Ian McInerney d5ceb8252e Clean up some warnings 2020-02-28 00:06:52 +00:00
Hufo 992a553d43 pcbnew: Refactor D_PAD::AddPrimitives() and allow use from python
Rename all the D_PAD::AddPrimitive methods to clean up their API,
and expose the vector<PAD_CS_PRIMITIVE> type in the python API.
2020-02-27 23:54:19 +00:00
Jeff Young 3860ab9f0c Fix issue returning pointers to items inside std::vector.
(When the vector is re-allocated your pointers become bogus.)
2020-02-27 22:00:51 +00:00
Tomasz Wlostowski f77d2f8cb8 router: option to enable optimization of the track being dragged 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 4525a17076 router: backspace key to undo last fixed segment(s) 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski b5c11f21e5 router: rounding mode context menu entry 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski d1a5d8c78b router: don't forget the tail when toggling via placement 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 8ddeb966ca pns: drag wip on walkaround via mode 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski cf4945afaa router: optimizer should now handle 'keep vertex' constraint correctly... 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 53c3f95ac4 router: initial attempt at walkaround mode for dragger 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski c0314dbb29 router: dragger can now optimize also the segment being dragged 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski a6d3ae3c5b router: NODE now can also query joints 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 6b767d50c3 router: initial support for user-provided constraints for the optimizer 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski c2d95a00c1 router: improved handling of corner cases in LINE::Walkaround 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 37a754c4dd router: initial attempt at improved 'aim at mouse cursor' strategy in walkaround mode, wip... 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 43b71cd9e3 router: Clear() method for PNS::LINE 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski dbe90e163e router: use one global logger object 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 4281bd8207 router: keep board in base Kicad Iface class 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 9e605d6958 router: DEBUG_DECORATOR now allows to name each primitive 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 065d634b30 router: put non-graphical part of ROUTER_IFACE into a parent class (for unit tests) 2020-02-27 22:02:56 +01:00
Ben Dooks 070c6b8ce0 Fix issue with DRC for through hole being applied to SMD pads
Commit d7272b7f5e fixed the use of
the eagle DRC to change the library pad shapes. This was also
applied incorrectly to SMD stacks.

Remove the references to m_rules in packageSMD() and the code
that deals with them. eagle 7.7 does not have any SMD pad options
other than rectangle with rounding.
2020-02-27 16:58:15 +00:00
Jeff Young 82ae9db262 Another variation on the wxDataViewCtrl issue.... 2020-02-26 17:56:47 +00:00
Jeff Young a2234b348d Another attempt to work around wxDataViewCtrl bug on GTK. 2020-02-26 17:35:10 +00:00
jean-pierre charras 2d0582daa7 Pcbnew, stack-up manager: allows 2 digits in mantissa for EpsilonR
Fixes #3942
https://gitlab.com/kicad/code/kicad/issues/3942
2020-02-26 18:12:24 +01:00
Jeff Young 4c563b541e Another attempt to get GTK wxDataViewCtrl to reload properly. 2020-02-26 14:41:12 +00:00
Jon Evans 5e9e46c7bd Fix crash opening footprint editor in debug mode with no board 2020-02-25 20:24:58 -05:00
Jon Evans 9f8ff236d6 Fix load and save of PNS settings 2020-02-25 19:36:36 -05:00
Seth Hillbrand 5b6a4d794f pcbnew: Avoid wx scaling error
When drawing to a scaled DC, the window doesn't reflect the expected
size if scaled after.  This causes elements drawn on the edge to reflect
back into the drawing area instead of being cut off.

We can simply scale our own values to avoid this issue.

Fixes #3849 | https://gitlab.com/kicad/code/kicad/issues/3849
2020-02-25 13:39:04 -08:00
Jeff Young 7c6f7e6b01 Try some undocumented wxWidgets call to fix DRC. 2020-02-25 18:26:42 +00:00
Jeff Young 0614bbc663 Silence a couple of compiler warnings. 2020-02-25 18:26:42 +00:00
Ian McInerney 879a8f4efb Rework the file history menus to not need references to the file history
Keeping a pointer to the actual file history inside a special
file history menu led to many cases of use after free crashes,
so instead rework the actual file history to add the menu
items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3741
2020-02-25 16:18:10 +00:00
Jeff Young 4e0cb3c1ad Another attempt at fixing Linux issue.
Note that I have no Linux machine, so this is shooting in the dark....
2020-02-25 13:51:59 +00:00
Jeff Young 4b380f0dc3 Fix compile issue on Linux & crash issue on Windows.
Fixes https://gitlab.com/kicad/code/kicad/issues/3937
2020-02-25 12:28:05 +00:00
Jeff Young cdad62022b Bug fix for double-click in DRC dialog.
Also better clean-up of highlighting in board editor window.
2020-02-25 12:18:24 +00:00
Jeff Young a4837f7d32 Move DRC dialogs to wxDataView.
This allows for hierarchy and better selection handling.
2020-02-24 23:19:17 +00:00
Jeff Young c5077aeb97 Move weak-reference stuff to UUIDs. 2020-02-24 23:19:17 +00:00
Jeff Young c7ec110fba Only center focused items when they're not visible.
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Jeff Young c68b554c8e Promote PathsAndReferences from wxArrayString to first-class-citizen.
Keeping the data in an un-serialized format greatly simplifies usage,
and should make it more robust.
2020-02-24 23:19:17 +00:00
jean-pierre charras fee5db80dc parseARC: parsing UUID: fix missing call to NextTok(), creating parse error. 2020-02-23 17:20:04 +01:00
Jeff Young 41b7c62c15 Delay initialisation of global EDA_ITEMs.
It causes issues with boost::uuid generation in some versions of
boost.
2020-02-22 13:42:28 +00:00
jean-pierre charras f206db2041 Pcbnew: fix crash on exit after using the track length tool.
This is due to the fact the PNS_TUNE_STATUS_POPUP was not hidden
before calling its destructor.
It is now fixed by setting its virtual destructor calling Hide().

TODO: see if it could be used for any class derived from STATUS_POPUP.
(We already have this issue in other places)
2020-02-22 10:34:11 +01:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Seth Hillbrand 3af868e3d1 Adding Arcs to TRACKS
This expands the TRACKS class to also include ARCS
2020-02-21 23:51:58 +00:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jeff Young 383403ef98 Push deprecation warning suppression down into boost.
Note: requires boost 1.67 or later.
Current boost version is 1.72.
2020-02-21 17:36:12 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jon Evans affdaa8c33 Fix one more warning 2020-02-20 19:38:32 -05:00
Jeff Young 2778dc90f3 Cleanup. 2020-02-20 23:52:32 +00:00
Jeff Young e1d59337d1 Protect GCC #pragmas. 2020-02-20 22:20:44 +00:00
Jeff Young 81dd1d7a68 Timestamp-based paths were ugly. UUID-based ones are worse.
Show a human-readable path in the Edit Footprint dialog.
2020-02-20 21:29:52 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jeff Young 4014afad54 Remove unused functionality. 2020-02-20 21:29:52 +00:00
Jon Evans 1a216f3703 Change action plugin settings storage to preserve hidden buttons 2020-02-20 11:01:49 -05:00
Jon Evans 4f555e7794 Fix QA crash: Pgm is null in test suite 2020-02-20 07:47:50 -05:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras 625249322e Pcbnew: regroup drc files to the already existing drc folder. 2020-02-19 10:31:32 +01:00
jean-pierre charras 39c2c4e13b Zone filler: pads non connected in zone option: use same algo as the 5.1 branch
to calculate thermal clearance (antipad size) for pads having the same netcode
as the zone, the net clearance has no meaning
(net clearance between object of the same net is 0)
and the zone_clearance can be set to 0 (i.e. use the netclass clearance).
Therefore use the antipad clearance (thermal clearance) or the zone_clearance if bigger.
2020-02-17 18:21:49 +01:00
jean-pierre charras 021eb2f3a8 Fix incorrect usage of a UTF8 char in a C string in code.
Using a UTF8 char inside a C string can work on unix, but not on Windows.
It must be explicitly converted in a unicode value inside a wide string
(like a wxString)
2020-02-16 10:21:36 +01:00
Ian McInerney 4fef513a3f Fix library table panel path adding and cleanup duplicate dialog
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
2020-02-14 19:07:27 +00:00
Jeff Young 3ec360f15c Save pinned libraries in project.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 14:22:54 +00:00
Ian McInerney 25b3cce474 Fix build error and cleanup overzealous refactor changes 2020-02-14 00:56:41 +00:00
Jeff Young 2017389f2d Pinning for library trees in FPEditor and SymbolEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
jean-pierre charras 92af5531bc Fp editor: fix: Reference and Value default values aren't saved
in Footprint Editor preferences

Fixes #3889
https://gitlab.com/kicad/code/kicad/issues/3889
2020-02-11 16:19:00 +01:00
Simon Richter 8d6e5953aa Remove include path option hiding preprocessor definition
This variable is empty, so the argument evaluated to "-I", and the next
argument was then interpreted as a path (and thus ignored). This hides a
preprocessor definition (-D) from Swig.
2020-02-07 20:08:11 +01:00
Ian McInerney 8b7d4c2a55 Put tool graphics back on the stack
Now that the tool framework gracefully shutdowns the tools, graphics
can be created on the stack inside a tool function.

This reverts commit f6881ce3de.
2020-02-05 22:23:44 +00:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Jeff Young 1e6840ea8f Don't report Eagle errors on the Unrouted layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/3398
2020-02-05 22:21:16 +00:00
Jeff Young d8cd48aa7f Allow duplication of module texts from board editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/3829
2020-02-05 22:21:16 +00:00
Ian McInerney 34e5b76c5f Add virtual constructors to some classes that should have them
This is more for safety from undefined deletion behavior than
anything else (it also silences the Clang -Wnon-virtual-dtor warning).
2020-02-05 22:19:14 +00:00
Seth Hillbrand e94f356ad5 pcbnew: Correct stop condition for expand
Typo in selection tool caused expansion past vias.
2020-02-05 14:14:50 -06:00
Ian McInerney 6b8d81e95d Add zone area to message panel
ADDED: Area of zone fill is displayed in the message panel

Fixes https://gitlab.com/kicad/code/kicad/issues/2412
2020-02-05 09:44:53 +00:00
Jon Evans ce4542cced ADDED: Allow exporting IPC-356D netlists from Python 2020-02-04 13:31:56 +00:00
Jeff Young fbeb0709ef Formatting cleanup. 2020-02-03 19:35:48 +00:00
Jeff Young f1b1c91961 Be a little more friendly towards SMD footprints.
Increase the coverage ratio a bit so that footprints that still
have 10% of their area available for selection won't bring up the
disambiguation menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young d02c0da3ab Remove preferred layer disambiguation for multiple modules.
The preferred list isn't actually in use anymore at this point, so
it currently has no effect other than to mess things up since we
aren't keeping track of which modules have been rejected when we
check the module count.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young 89dfee9ebe Employ an accuracy when hittesting (particularly for lines).
Also fixes a bug where the parent module was being hit-tested
for its children.

Fixes https://gitlab.com/kicad/code/kicad/issues/3750
2020-02-03 15:08:01 +00:00
Jeff Young 2286652abe Handle duplication of footprint ref and value.
Fixes https://gitlab.com/kicad/code/kicad/issues/3828
2020-02-03 15:08:01 +00:00
Jeff Young a04fdf64da Improve directory handling for Project Save As.
1) don't change directory names that we don't recognize
2) when we do, make sure the child files get copied to the
changed name.

Fixes https://gitlab.com/kicad/code/kicad/issues/3834
2020-02-03 15:08:01 +00:00
jean-pierre charras 8f3e8cf893 Dxf importer: fix issue when importing some "degenerated" splines.
Sometimes a dxf curve is a "degenerated" bezier curve having only 3 points.
(a control point is at same location as a end point)
This commit fix incorrect import of these curves.
2020-02-03 10:39:29 +01:00
jean-pierre charras fd0728becf Fix an other crash similar to f6881ce3. 2020-01-31 16:41:47 +01:00
jean-pierre charras f6881ce3de Fix crash after calling EDIT_TOOL::pickCopyReferencePoint()
An instance of STATUS_TEXT_POPUP was created on the stack.
But it crashes pcbnew when closing the current main frame,
perhaps due to stack switching in coroutines.
It is now created on the heap.
2020-01-31 16:08:18 +01:00
Alexander Shuklin 3d0b3a51f3 Eeschema: Adding back annotation
ADDED: Back annotation algorithm,
eeschema back annotation dialog

CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
jean-pierre charras 418dba440d Pcbnew: DIALOG_FOOTPRINT_BOARD_EDITOR: minor enhancement.
The footprint sheet path (unique ID) is now displayed in this dialog.
2020-01-29 10:00:56 +01:00
jean-pierre charras 48ae188b15 Zone filler: fix a few issues, in Smoothed Polygons mode.
- Fix non optimal shape of solid polygons after inflate transform.
- Add a small extra clearance ((2 microns) when creating clearance areas
(especially, convert arc to polygons create small differences)
- Add a small threshold (1 micron) in drc test distances to avoid false positives
- fix a minor issue in TransformOvalToPolygon that created sometimes a not perfect shape

Fixes #3812
https://gitlab.com/kicad/code/kicad/issues/3812
2020-01-26 18:19:24 +01:00
Jon Evans 56a9670cf6 Fix running PcbNew from build dir on windows 2020-01-24 21:21:35 +00:00
jean-pierre charras a98195f650 fix a minor compil warning 2020-01-24 10:15:55 +01:00
jean-pierre charras d12e8479f2 Pcbnew: fix crash when trying to select the previous copper layer.
The function that calculates the previous layer id was using a illegal value
in some cases.

Fixes #3805
https://gitlab.com/kicad/code/kicad/issues/3805
2020-01-24 10:13:18 +01:00
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Ian McInerney 752bc5b7ba Update technical todo
Add a section mentioning C++20 and the new constexpr
std::string and std::vector that we can use.
2020-01-21 11:03:55 +00:00
Mark Roszko 10a862c458 Recursively add KiCad and GEDA libraries inside a folder
CHANGED: KiCad and GEDA libraries can now be added recursively by selecting a parent folder.
2020-01-21 10:39:07 +00:00
Jeff Young a91ca785e5 Better to warn user and orphan nets than refuse to open board. 2020-01-21 09:29:33 +00:00
jean-pierre charras dd46a918a8 Fix bug: Cross-probing of pins to pads selects entire footprint instead of desired pad.
Fixes #3791
https://gitlab.com/kicad/code/kicad/issues/3791
2020-01-20 18:35:20 +01:00
qu1ck 32674ef360 Fix polygon shape move
Move vector should not affect start/end points as they are assumed to
always be 0,0. Polygon is defined by outline only.
2020-01-20 03:49:41 +00:00
Seth Hillbrand 7c296fbcb7 GRID_HELPER: Provide alignment axes from snap points
ADDED: alignment lines from item snap points

Alignment lines are shown when moving the cursor horizontally or
vertically from a possible snap point.
2020-01-18 20:43:40 -08:00
Seth Hillbrand 73d6169338 pcbnew: Check before reading/writing cache
The open/create calls can fail so we need to account for this before
using the result that assumes success.
2020-01-17 18:30:17 -08:00
brian piccioni 8341398082 Save footprint errors in the DRC log
Fixes https://gitlab.com/kicad/code/kicad/issues/3754
2020-01-18 01:40:43 +00:00
Seth Hillbrand c4fff95078 PNS: Detect collisions including newline width
The new line collision search uses BBox() to check for colliding
objects.  BBox in the SHAPE_LINE_CHAIN did not include width as the
chains were assumed to be zero-width.  This is not the case for
PNS::LINE elements.

We mostly don't notice this because DRC checks for SEGMENT collisions
but it becomes obvious/annoying when we cannot place a track for unknown
reasons and the snap-back doesn't take line width into account.

Fixes #3776 | https://gitlab.com/kicad/code/kicad/issues/3776
2020-01-17 11:23:08 -08:00
Seth Hillbrand f7cb970a02 PNS: Modify MarkObstacles logic to select shorter
When routing where we hit multiple obstacles, we choose the shortest
path to allow overlapping hits to choose the shorter path, thus giving a
better chance of returning true for the DRC-compliant path.

Fixes #3773 | https://gitlab.com/kicad/code/kicad/issues/3773
2020-01-16 19:57:38 -08:00
Ian McInerney 56f6b529c8 Simplify 3D object cache class structure
Remove the CACHE_WRAPPER whose sole purpose was to allow the
cache to be stored in the project, and instead just have the cache
inherit the proper class.
2020-01-15 23:32:05 +00:00
Jeff Young 102f5f479c Handle uninitialized nets gracefully. 2020-01-15 19:40:20 +00:00
Jeff Young cfa407616f Don't allow degenerate arcs & circles. Trouble will follow. 2020-01-15 18:50:47 +00:00
Jeff Young dcfb7cadce Avoid divide-by-zero. 2020-01-15 18:21:42 +00:00
Jeff Young 9df2cfb328 More uninitialized variables. 2020-01-13 20:16:40 +00:00
Jeff Young 91d1508c16 Fix some Coverity identified issues. 2020-01-13 20:16:40 +00:00
Ian McInerney 3ab9db6ff1 Update cast in PNS since we are guaranteed to have text
We are guaranteed that the BOARD_ITEM will be a TEXTE_MODULE
since we have tested its type already, so just use a static_cast
to remove the overhead.
2020-01-13 19:42:49 +00:00
Ian McInerney 81ee5edcaf Test dynamic_cast for safety from future changes 2020-01-13 15:22:26 +00:00
Ian McInerney 34bc0a4e96 pcbnew_control: Replace C casts with C++ casting 2020-01-13 14:19:44 +00:00
Ian McInerney e2853862e5 Cleanup redundant type casting 2020-01-13 14:00:45 +00:00
Ian McInerney 8fc434be19 Formatting change for dynamic cast tests 2020-01-13 01:48:57 +00:00
Ian McInerney 36f6b4a9b4 Clean up redundant dynamic casts 2020-01-13 01:39:08 +00:00
Jeff Young 94f8aafec5 Fix missing variable initialization. 2020-01-13 00:18:49 +00:00
Jeff Young d24bd5c832 Fix a couple of Coverity issues. 2020-01-12 21:07:41 +00:00
Jeff Young 8d0f31f6f4 Clean a bunch of legacy code out of the Filter Selection dialog. 2020-01-12 20:53:56 +00:00
Jeff Young 127c66285b Rename old DIALOG_BLOCK_OPTIONS to DIALOG_FILTER_SELECTION....
... which is what it has done for some time now.
2020-01-12 20:30:58 +00:00
Jeff Young 836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Ian McInerney b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Ian McInerney 4ffbefb9dc Use the layer from the module item instead
They are both from the same argument, but this one make coverity happy.
2020-01-12 19:39:39 +00:00
Seth Hillbrand 52bfdb9703 PNS: Assume the current line is a base before optimizing
We use the cost of the current line before trying to improve the pad
breakout cost when optimizing the smart pads

Fixes #3759 | https://gitlab.com/kicad/code/kicad/issues/3759
2020-01-12 11:08:46 -08:00
Ian McInerney 3346f812a9 Cleanup error handling in VRML export (from coverity scan) 2020-01-12 17:18:08 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Seth Hillbrand 76c26d6ae1 Remove unneeded unique_ptr
The unique_ptr was useful when the original function took multiple paths
which could de-scope the pointer.  Current use allowed potential
use-after-free. This is now re-written to pass pointer directly.
2020-01-11 17:29:12 -08:00
Jeff Young 3d8150032f Fix some uninitialized variables found by Coverity. 2020-01-11 21:29:25 +00:00
Jeff Young 2e509480a4 Fix guaranteed divide-by-zero error when called with correction of 0. 2020-01-11 21:29:25 +00:00
Jeff Young 715448611d Fix potential divide-by-zero (from Coverity scan). 2020-01-11 21:29:25 +00:00
Jeff Young 17710c15d3 Fix leak of empty PICKED_ITEMS_LIST. 2020-01-11 21:29:25 +00:00
Jeff Young 9182b3a850 Remove dead code and simplify remaining logic. 2020-01-11 21:29:25 +00:00
Ian McInerney 43abd53b19 Clarify limits of the if statement 2020-01-11 21:28:25 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Jeff Young 254ba1f998 Fix null pointer access (from Coverity scan). 2020-01-11 00:15:47 +00:00
Jeff Young 88eab8134e Fix a couple of uninitialized variables (from Coverity scan). 2020-01-11 00:11:31 +00:00
Jeff Young 7bb9551801 Handle boost exceptions. (From Coverity scan.) 2020-01-11 00:04:01 +00:00
Jeff Young 5e5edd03f6 Implement super- and subscript printing and plotting for eeschema. 2020-01-10 22:32:49 +00:00
Jeff Young e03281a9ae Allow exclusive-or selections on OSX. 2020-01-10 22:32:49 +00:00
Ian McInerney 7c61b83df6 Code cleanup 2020-01-10 20:10:29 +00:00
Ian McInerney 5e6c6e7e22 Fix memory leak in the footprint preview panel
The cached modules were never deleted, so they would
leak whenever the panel was closed.
2020-01-10 20:10:29 +00:00
Seth Hillbrand 77c60d9655 Remove the last vestiges of dlist
It served us (mostly) well for more than a decade.  It helped KiCad grow
before the std:: came into decent shape or speed.  It was a good little
list.

RIP DLIST 2008-2020
2020-01-10 06:37:08 -08:00
Ian McInerney a8d9fcb4e0 Fix event handler type casting
The old methods were very clunky and not recommended (and didn't
properly cast the function types). This changes to useing the
recommended way of declaring events and casting the event handlers.
2020-01-09 18:08:49 +00:00
Seth Hillbrand 16026e75cf pcbnew: Don't compare across containers
std:: defines cross-container comparison as invalid and is not
guaranteed to work.  This breaks the comparison out into separate
steps, each for the separate containers.
2020-01-07 16:03:32 -08:00
Ian McInerney 9dff31c2ac Remove unused DIALOG_FILE_DIR_PICKER
This class was replaced with native dialogs for choosing
the files and directories
2020-01-07 23:40:00 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Simon Richter b114dabbed Convert line endings in three FBP files 2020-01-07 13:32:33 +00:00
jean-pierre charras 86f9ed1dd9 Allows pad property only by the kicad_advanced feature.
pad property is allowed if "UsePadProperty=1" is found in kicad_advanced.
2020-01-06 18:11:01 +01:00
jean-pierre charras f2518a5120 ADDED: pad fabrication property, as required in latest Gerber file specification.
Property is a pad info used mainly for fabrication or test.
Currently, supported properties are:
BGA property (variant of SMD pad)
Fiducial (global to the board or local to the footprint)
Test Point
Heat sink
Castellated.
And are used in Gerber files (copper layers and drill files)

Increment BOARD_FILE_VERSION  to 20200104
2020-01-06 16:37:35 +01:00
Jon Evans 28222d3bd0 Use existing pcb filename for Save As where possible 2020-01-06 14:26:03 +00:00
Simon Richter a5c7d452ce Convert line endings back to Unix
- pcbnew/class_board.h
2020-01-05 00:48:18 +01:00
Fabien Corona 820690d024 pcbnew : fix selection color for the 'hole' part of NPTHs
The inner circles of NPTHs now change color when selected

Fixes #1860
2020-01-04 20:59:49 +00:00
Jon Evans 772835e3e3 Add fifo_map and use it for Gerber job file generation 2020-01-04 11:05:09 -05:00
Jon Evans 21d577e638 Implement Gerber job file writing using nlohmann/json 2020-01-04 10:46:50 -05:00
Ian McInerney 4c1e64628e pcbnew: Modify IDs in panel_fp_lib_table
Move the IDs from the main enum to be local and use
the end of the main enum as the starting point.
2020-01-03 16:10:53 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Mark Roszko 49db816c82 Pcbnew: improve add existing footprint library browser and button
CHANGED: Modify Add Existing Footprint Library button to us OS file/directory browsers
2020-01-03 15:09:26 +00:00
jean-pierre charras ed0a28769a code cleaning: remove useless includes. 2019-12-31 14:58:39 +01:00
Fabien Corona 496f3d49e4 pcbnew: When using '+' and '-' hotkeys, skip non-visible layers
CHANGED: pcbnew: When using '+' and '-' hotkeys, skip non-visible layers

Fixes https://gitlab.com/kicad/code/kicad/issues/3443
2019-12-29 23:37:25 +00:00
jean-pierre charras 7241247fbc Pcbnew: add missing storage of dimension units and dimension precision in pcb files.
https://gitlab.com/kicad/code/kicad/issues/3712
2019-12-28 13:27:31 +01:00
Jeff Young ffe3fdf832 Set m_netNamesOnVias. We currently follow m_netNamesOnPads.
We could also follow m_netNamesOnTracks, or add another set of
options in the GUI.  But for now I suspect this is sufficient.
2019-12-28 11:58:33 +00:00
jean-pierre charras cd1f3acf49 Fix compil warnings 2019-12-28 08:43:29 +01:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Jon Evans 80fb3bde56 Don't try to write fp-info-cache to a read-only directory
Fixes #1890
2019-12-25 18:38:31 -05:00
jean-pierre charras a12b803af5 Add missing option to show footprint texts in fill or sketch (line) mode.
This option is settable in stable version, but not in master.
So, this option set from the stable version could be modified in master version.
2019-12-23 18:11:45 +01:00
Ian McInerney bf5dba847c pcbnew: Fix cmake to work with no wxPython on macOS 2019-12-22 02:04:15 +00:00
Ian McInerney 7fb56cf9a3 Fix compile error due to enum changes
Merge request !23 changed to strongly typed enums,
so we now need to explicitly cast the output in the
Python getters.
2019-12-20 14:47:41 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Ian McInerney 116ac9aa75 Move dxflib, tinyspline and nanosvg into a thirdparty library directory
Part of fixing https://gitlab.com/kicad/code/kicad/issues/3637
2019-12-19 17:41:02 +00:00
Ian McInerney b9d8849b28 Unify unsaved changes detection logic in all frames
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
2019-12-19 15:34:01 +00:00
Mark Roszko 686b768a3d Add shutdown blocking on Windows for pcbnew, eeschema and pleditor
ADDED: Block shutdown/logoff on Windows when contents have been modified
2019-12-19 14:11:11 +00:00
jean-pierre charras a9f9540fa4 Pcbnew: minor cosmetic enhancement:in status panel, for polygon graphic shape:
shows the coordinates of the first polygon point (instead of 0,0 coordinates)
2019-12-19 08:30:20 +01:00
jean-pierre charras cc185e4b8a Pcbnew: fix crash when deleting pads in the board editor
Fixes # |3684 https://gitlab.com/kicad/code/kicad/issues/3684
2019-12-17 13:56:17 +01:00
jean-pierre charras fa200f3d39 Pcbnew: enhancement: graphic polygon: display the points count, instead of length.
Previously, the meaningless length (always 0) was displayed.
2019-12-17 08:40:44 +01:00
jean-pierre charras 6bc8005d60 Pcbnew: fix strange behavior when editing board setup, if a zone is currently selected.
The zone was silently deleted.

Fixes #3673 | https://gitlab.com/kicad/code/kicad/issues/3673
2019-12-16 12:44:53 +01:00
Jeff Young d40019210f Allow undo during a drag. 2019-12-15 21:33:58 +00:00
Jeff Young 1f07505b27 Fix long-standing issue with arrow keys moving in both axes. 2019-12-15 14:29:47 +00:00
jean-pierre charras d14950c3f8 Pcbnew: Add missing options to show graphics in fill or sketch mode.
These options where settable in stable version, but not in master.
So, the options set from the stable version cannot be modified in master version.
2019-12-15 13:56:26 +01:00
Seth Hillbrand dc241df602 pcbnew: Cleanup stale code 2019-12-13 11:22:18 -08:00
jean-pierre charras 02977aacfc Pcbnew: fix incorrect rotation angle unit when building thermal spokes
The new Rotate function uses radians, not deci-degrees.

Fixes #3668 | https://gitlab.com/kicad/code/kicad/issues/3668
2019-12-13 17:41:20 +01:00
Mark Roszko ae785194ce Silence/fix double to float conversion warnings 2019-12-12 21:51:21 +00:00
Seth Hillbrand 0e1a274f0c pcbnew: Clean unused lambda includes 2019-12-12 11:52:50 -08:00
Seth Hillbrand eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +00:00
jean-pierre charras 21dd8db7a9 P&S router: length tuning tool: fix a crash after trying to tune a track.
It happens on Windows, and wxWidgets 3.1.3.
It is created by PNS_TUNE_STATUS_POPUP instance used in tool.
I am pretty sure this crash is created by the stack switching
when managing events, due to some changes in wxWidgets code.
the fix creates the instance on the heap, instead of on the stack.
This is not the first time I see this kind of issue.
2019-12-12 09:39:51 +01:00
Jeff Young 351e249105 Fix full-screen-crosshairs toolbar button.
Fixes #1937 | https://gitlab.com/kicad/code/kicad/issues/1937
2019-12-11 21:04:52 +00:00
jean-pierre charras e57fe9d173 Gerber object attribute: avoid trying to guess if a SMD pad is a BGA pad.
Previously, if a SMD pad was round, itb was seen as BGA pad.
But this is not always true. so use always SMD PAD attribute,
until an explicit BGA pad attribute is added in Pcbnew
2019-12-11 08:52:31 +01:00
Seth Hillbrand 9b7d4e2742 Recleaning DLIST from pcbnew
This was re-introduced by 5d3e6e3d44

The crash happened b/c we have to manage list containers in each element
and minor adjustments cause the rest of the list to be lost.  This
commit re-implements it using std::iterators and deque

Fixes #2623 | https://gitlab.com/kicad/code/kicad/issues/2623
2019-12-10 09:52:07 -08:00
jean-pierre charras c7ce93e10e Pcbnew: fix crash on exit, if a place zone tool is activated. 2019-12-08 18:01:02 +01:00
Seth Hillbrand b6b805548d PNS: Allow snap to temp hidden
The IFACE for kicad refers to the board hidden state, not the
temporarily hidden state used by the router.  We allow snapping to items
that have been removed by the temporary router state to provide snapping
to original track location.

Fixes #1827 | https://gitlab.com/kicad/code/kicad/issues/1827

(cherry picked from commit 1e64524afb)
2019-12-07 09:51:02 -08:00
Seth Hillbrand 9f896312ee Add missing include 2019-12-06 06:47:03 -08:00
Seth Hillbrand 4aa9552f1f Adding missing include 2019-12-06 06:26:59 -08:00
Fabien Corona 36fba5bd7f PCBnew: placing a blind/buried via sometimes incorrectly place a through via.
Fixes #1819
https://gitlab.com/kicad/code/kicad/issues/1819
2019-12-06 13:11:33 +01:00
Seth Hillbrand ac92afcf13 Clean up compile warnings
Ratsnest did not need a reserve and then iterative emplace.  Instead, we
use resize().  Stroke font gets private vars initialized and kiway
variables that are only used in debug builds are properly scoped for
releases as well
2019-12-05 20:05:21 -08:00
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Seth Hillbrand a2edf9c442 Unified update to C++14 std::make_unique
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
2019-12-05 10:43:55 -08:00
jean-pierre charras 4a75cc586c Zone filler: do not create stubs in thermal reliefs when not possible.
pad size is sometimes smaller than the zone minimal width.
So, to avoid strange and incorrect results, do not create the stubs in
thermal relief when the pad size is smaller than the zone minimal width.
2019-12-04 13:23:09 +01:00
Jeff Young 089ce90de3 Fix some issues with the previous commit. 2019-12-02 23:35:19 +00:00
Jeff Young 9b36489270 Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:52:50 +00:00
Jeff Young a9da0c6ecf Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726
* https://bugs.launchpad.net/kicad/+bug/1853726
2019-12-02 20:01:44 +00:00
jean-pierre charras 5cd7f3fdee DIALOG_DRC_CONTROL: fix a crash on wxWidgets 3.1.3, Windows,
Happens when right clicking on an item in displayed lists.
The crash was due to a bug in wxWidgets, and the fix is only a workaround

Also remove duplicate code.
2019-12-02 11:27:40 +01:00
Jeff Young 342c8941b5 More cleanup of dialog_find-base.fbp 2019-11-30 01:00:16 +00:00
Jeff Young 1e4437c6df Some cleanup for the Pcbnew search changes. 2019-11-29 21:38:18 +00:00
Fabien Corona 7297822423 pcbnew: search options
-Users can now search DRC markers with string filtering
-GUI changes for consistency with Eeschema

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:58:05 +00:00
Fabien Corona 5d3e6e3d44 pcbnew: search options
-Add a "wrap" option->Search results implemented as a nested list.
-Allow to go back with a "Find previous" button
-Remove the marker search option
-Fix a DLIST issue
-Add a result counter ("eg: hit(s): 1/3")
-Search history limited to 10
-Fix the search history order
-User can include or exclude references/values/texts from results

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:55:01 +00:00
Jeff Young 102b530162 Fix library tree updating bug present at least on OSX. 2019-11-29 17:55:01 +00:00
Ian McInerney 9f9b48739c pcbnew: Adjust dimension display after updating units
Fixes: lp:1854167
* https://bugs.launchpad.net/kicad/+bug/1854167
2019-11-27 16:39:13 +00:00
jean-pierre charras c186e7d391 Cosmetic and usability enhancements.
- Better menu texts
- do not show pad edit options in board editor,
when they are used only in the footprint editor.
2019-11-26 19:53:00 +01:00
jean-pierre charras 2cd60cdfaf Layer stack manager: remove dielectric layer: fix incorrect sub-layer selection. 2019-11-25 13:30:48 +01:00
jean-pierre charras ce7857b715 Layer stack manager: fix crash due to a double deletion on unix.
Did not happen on Windows.

Fixes: lp:1853764
https://bugs.launchpad.net/kicad/+bug/1853764
2019-11-25 10:51:59 +01:00
John Beard eb61c1bbc4 Reset Windows file endings to Unix
Commit 71cd8c57b changed pcbnew/kicad_plugin.cpp to Windows
file endings. This means that any patches on this file no longer
apply.
2019-11-25 15:07:38 +08:00
Ian McInerney f7ded3040c pcbnew: Modify new file to have a better prompt when closing old board
CHANGED: The new file prompt now asks to save the board if needed

Fixes: lp:1853338
* https://bugs.launchpad.net/kicad/+bug/1853338
2019-11-24 14:51:29 +00:00
Ian McInerney 610964b59c modedit: Disable editing tools when no footprint is loaded 2019-11-24 11:55:30 +00:00
Ian McInerney 82f55d300b pcbnew: Fix flicker in layer widget when toggling grid 2019-11-24 00:51:54 +00:00
Ian McInerney e82795ba58 Fix grid settings in pcbnew/modedit/cvpcb
* Make the grid display settings separate from the board object
* Ensure that the grid is initialized on creation in all the frames

Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
2019-11-23 23:35:21 +00:00
Ian McInerney 99b9354a51 Add clear recent files action to the menus
ADDED: Menu item to allow the recent file lists in each program to be
cleared

Fixes: lp:1821685
* https://bugs.launchpad.net/kicad/+bug/1821685
2019-11-23 23:35:21 +00:00
jean-pierre charras c34dfc4230 fix a minor compil warning 2019-11-23 18:36:40 +01:00
jean-pierre charras 2dc81b0b8a Update SEXPR_BOARD_FILE_VERSION to 20191123 to support pin function in pads 2019-11-23 10:07:56 +01:00
jean-pierre charras f7159e4692 Make pin function in pads an advanced feature.
Mainly because it creates a new keyword a new keyword in *.kicad_pcb files,
and needs some tests, this is currently a advanced feature.
Enable it by adding "UsePinFunction=1" in "kicad_advanced" config file.

Note also "UsePinFunction=1" only enable saving this info in *.kicad_pcb
and kicad_mod files.
2019-11-23 09:12:44 +01:00
jean-pierre charras 71cd8c57bf ADDED: Pcbnew, add "pin function" (pin name in eeschema) to pads.
The pin name defined in Eeschema is now available as pad info.
Useful for the board designer (the pin function is displayed in the message panel).
Needed for the Gerber P&P files.
2019-11-23 09:12:43 +01:00