Commit Graph

20204 Commits

Author SHA1 Message Date
Jon Evans e345e7d17a Allow creating an empty project when saving a board standalone 2020-09-21 23:55:02 -04:00
Jon Evans 18e17abd6a Rename "Keepout" to "Rule Area"
These objects can now be used in advanced DRC rules and
not just for keeping things out.  Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Jon Evans 6ee866ba6e Set default zone opacity to 60%
Defaulting to less than 100% helps with eyestrain and
aids the "legibility" of boards
2020-09-21 23:53:21 -04:00
Seth Hillbrand 408cd20294 drc: Test all zone layers for intersection
Zones can span multiple layers so we need to test each explicitly.

Fixes https://gitlab.com/kicad/code/kicad/issues/5750
2020-09-21 20:40:50 -07:00
Seth Hillbrand 76e44c2f4b pcbnew: Really deal with missing segments this time
The OpenGL missing segments (when small) are due to rounding in larger
coordinates.  The GAL shader uses floats to represent int32 values for
position and distance.  Thus, at larger coordinates, the smaller integer
values cannot be represented accurately.  This tests for the rounding
error and, if it exists, draws a plain circle instead

Fixes https://gitlab.com/kicad/code/kicad/issues/5751
2020-09-21 16:59:31 -07:00
Seth Hillbrand ffa1947056 pcbnew: Simplify copy routine
Choose a decent copy reference from the mouse position when copying.
Don't break UX standards by requiring mouse action when activating copy.
2020-09-21 13:28:21 -07:00
Jeff Young e939afdbe8 Use a better green for DRC badges. 2020-09-21 21:09:58 +01:00
Jeff Young 4badcba4c2 Zone fill performance improvements
1) better load-balancing for deferred zones
2) sort zones by priority before filling
3) retire BOARD::GetZoneList() which had a horrible performance profile
4) implement a zone bounding box cache
5) better checks for IsCancelled() so long fills can be exited

Fixes https://gitlab.com/kicad/code/kicad/issues/5738
2020-09-21 21:09:58 +01:00
Ian McInerney d3dd1c45b6 Disable editing tools on the canvas when DRC is running 2020-09-21 20:39:46 +01:00
Seth Hillbrand 975e5562a0 EEschema: Sort Hierarchy tree
This sorts the hierarchy tree children alphabetically
2020-09-21 11:17:33 -07:00
jean-pierre charras 456735f803 VIEW::ViewGetLOD() returns double now instead of int.
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
2020-09-21 17:55:24 +02:00
Seth Hillbrand 3eb7dc6eef Limit displayed error percentage
When calculating E series resistors, display error percentage down to
0.01% but rather than showing 0.00% error for smaller values, we now
  show the error is "<0.01%" until it is exact.

Fixes https://gitlab.com/kicad/code/kicad/issues/5731
2020-09-21 06:20:32 -07:00
jean-pierre charras 492a634413 Fp editor: Fix bug when moving fp anchor: pad shapes where not updated on screen. 2020-09-21 14:43:26 +02:00
Jeff Young 719e8d276f Use footprint editor display and window settings for footprint viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5737
2020-09-21 13:13:09 +01:00
Ian McInerney b1160660d9 Check return value for zone fill in VRML exporter
If the zone fill failed, then don't add the zone to the
exported VRML because it might not be correct.

Also test that the Python command in DIALOG_SCRIPTING worked.
This dialog actually isn't used anywhere currently, so it
could in theory be removed - but it is simple enough and
it provides a decent testing dialog that it is more work to remove
it.
2020-09-21 12:32:30 +01:00
Ian McInerney 70a7d1bc7c Cleanup variable usage and assignment in gerber reader 2020-09-21 12:19:49 +01:00
Ian McInerney e9aa9a759a Add missing break statements to prevent fallthrough
Otherwise all RC_ITEM objects are severity info in the log
2020-09-21 12:18:46 +01:00
Ian McInerney 7dfbb3cb18 Cleanup formatting 2020-09-21 12:15:03 +01:00
Ian McInerney 9e6a1225db Catch exception when creating app settings objects
These settings objects could be created in a constructor/destructor
so we should catch the exception since those are noexcept.

Also change the settings trace to match the other kicad traces
as KICAD_SETTINGS
2020-09-21 12:07:51 +01:00
Ian McInerney 542f447daa DRC tool: Ensure all calls to the dialog are guarded by null checks 2020-09-21 12:04:41 +01:00
Jeff Young 6020b70596 Display green badge for zero errors or zero warnings.
Fixes https://gitlab.com/kicad/code/kicad/issues/5735
2020-09-21 11:59:27 +01:00
Jeff Young c6fb799fcd Restore severity in saved DRC/ERC reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/5733
2020-09-21 11:59:27 +01:00
Jeff Young 1b77c4c270 Mention rule priority system in Syntax Help and Clearance Report.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-21 11:59:27 +01:00
Jeff Young 865249c227 Handle two panels both referencing same colour theme.
Fixes https://gitlab.com/kicad/code/kicad/issues/5185
2020-09-21 11:59:27 +01:00
jean-pierre charras 4db4a0a46f Pcbnew, PCB_PAINTER: very minor enhancement for commit 2751c677 2020-09-21 08:56:53 +02:00
Ian McInerney e0c2531f53 Catch exception inside JSON_SETTINGS constructor
This exception will probably never be thrown in real life,
but the constructors are normally noexcept, so throwing
any exception from the json library causes Coverity to
have a fit.
2020-09-20 23:50:09 +01:00
Ian McInerney 2becd368d9 Thirdparty: Properly handle error condition in nanosvg
ftell() returns -1 on an error, so it must be a long return
type, and we should test for its failure.

(found by Coverity)
2020-09-20 22:39:31 +01:00
Ian McInerney 68985490c6 Update lemon and its template to most recent upstream version
This should fix some Coverity warnings about memory management
in the lemon tool (less critical), but also fix improper
memory accesses in the generated parsers (labeled critical
by Coverity).

Ref: https://sqlite.org/forum/forumpost/edecf32da3
2020-09-20 22:27:11 +01:00
Jeff Young 650cff5b39 Shorten solder mask alert and provide a link for fixing.
Fixes https://gitlab.com/kicad/code/kicad/issues/4798
2020-09-20 21:26:39 +01:00
Jeff Young b3a369bd7c Remove zone areas outside board edges.
The first attempt to address this which added back in the zones
with a 0 netcode didn't pick up those with a netcode which weren't
isolated (ie: because there were unplaced footprints outside the
board edges).

The new system gives up on trying to adjust the insulated island
list and just makes a second pass.

Fixes https://gitlab.com/kicad/code/kicad/issues/5658
2020-09-20 20:36:01 +01:00
Jeff Young fdbb28aea2 Treat Reference and Unit as separate words when searching.
Fixes https://gitlab.com/kicad/code/kicad/issues/4630
2020-09-20 18:57:33 +01:00
Dominik Wernberger 884bed7e12 Fix that all file types are shown in file dialog 2020-09-20 16:04:44 +00:00
Jeff Young d9a94dc538 Don't allow selection of PCB_NETINFO_T.
Fixes https://gitlab.com/kicad/code/kicad/issues/5729
2020-09-20 16:41:39 +01:00
jean-pierre charras e64806cd20 Menus/Submenus: fix incorrect bitmap for checkable menuitems in submenus.
Windows specific, because other OS do not accept user bitmaps in ckeckable menuitems
the bug was due to the same bitmap was set for each state for these menuitems.

Fixes #5622
https://gitlab.com/kicad/code/kicad/issues/5622
2020-09-20 16:30:23 +02:00
jean-pierre charras 0b03d8a5ff Fix a few Coverity warnings. 2020-09-20 16:30:23 +02:00
jean-pierre charras 2751c67746 Pcbnew, PCB_PAINTER: provides an option to show footprints bounding box.
This is only for bounding box debug purposes, and is not activated.
2020-09-20 16:30:23 +02:00
Jeff Young 1039fb1bc5 Minor refinement to Import Settings from Board dialog.
Also some defensive code to protect against an ASAN stack buffer
underflow.

Fixes https://gitlab.com/kicad/code/kicad/issues/5660
2020-09-20 13:55:59 +01:00
Jeff Young 0b108d61e7 Cairo canvas not on Mac; no need to show antialiasing settings. 2020-09-20 13:55:59 +01:00
Jeff Young ad2407867a Disable Save Report while DRC is running.
Fixes https://gitlab.com/kicad/code/kicad/issues/5723
2020-09-20 13:55:58 +01:00
Jeff Young e27ff1dd3c Add Select All to multi-line text properties. 2020-09-20 13:55:58 +01:00
Ian McInerney 89dcc46898 Coverity cleanup and remove unused variables 2020-09-20 02:20:41 +01:00
Ian McInerney 65bd1ee9a4 Add a new BITMAP_BUTTON widget and use it in the appearances panel
This button behaves like an AUI button, so it is more suited
to being on panels without a border.
2020-09-20 01:43:27 +01:00
Ian McInerney c5feccca53 Add stub functions in KIPLATFORM to detect dark mode
These haven't been written yet, but current code can
be adapted to use these now.
2020-09-20 01:43:27 +01:00
Ian McInerney f82ad61c90 More warning cleanup 2020-09-20 01:43:27 +01:00
Jeff Young 4558aff24b Add textVar cross-reference support to Dimensions.
Also adjusts spacing in the dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/5664
2020-09-19 20:42:30 +01:00
Jeff Young 13f1de8e73 Forgot a bunch of files from last commit. 2020-09-19 19:53:58 +01:00
Jeff Young 64fa400b19 Ease translation a bit.
Also improves the SNR and consistency of the menu item text.  For
instance, a position is rarely useful, while relative sizes can be.

Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
2020-09-19 18:49:06 +01:00
Jeff Young db5de738ae Apply rules commutatively. 2020-09-19 18:48:11 +01:00
jean-pierre charras 121ccc3a10 Fix broken MODULE::HitTest()
HitTest was using a rotated bounding box, but the bounding box
is already right.
2020-09-19 19:37:58 +02:00
jean-pierre charras 55089f4732 Better strings for translation (minor fix) 2020-09-19 19:02:19 +02:00