Commit Graph

9778 Commits

Author SHA1 Message Date
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 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
Seth Hillbrand d227b53e1a Fix broken translation string 2020-09-19 09:13:30 -07:00
Jeff Young d402d93487 Implement shape routines for DIMENSION_Ts.
This allows them to participate in DRC and PNS.

Fixes https://gitlab.com/kicad/code/kicad/issues/5712
2020-09-19 14:16:00 +01:00
Jeff Young ece2ae9805 Don't capture commands in the router eventloop that it doesn't process.
Fixes https://gitlab.com/kicad/code/kicad/issues/5692
2020-09-19 12:08:18 +01:00
Jeff Young 0763a8962c Implement boolean not processing in expression language.
Also adds some more error catching to be more robust in the face
of malformed customer rules.

Fixes https://gitlab.com/kicad/code/kicad/issues/5694
2020-09-19 12:08:18 +01:00
Seth Hillbrand 23f7ba6ee4 Ensure that we had a pad remaining before painting
Null polygons should not be send to the painter, so we need to check to
see if our mask has removed the complete pad before painting

Fixes https://gitlab.com/kicad/code/kicad/issues/5702
2020-09-18 22:33:24 -07:00
qu1ck 5e0d79449e Fix pcbnew api for DIMENSIONs
DIMENSION is now an abstract class and we should cast to
concrete implementations instead.

Also change broken 'return none' to throwing an exception
which will give feedback about what is not supported by
the API instead of silently returning a non-object.
2020-09-18 22:52:47 +00:00
Jeff Young 2799faf52b Add syntax example using "not".
Fixes https://gitlab.com/kicad/code/kicad/issues/5694
2020-09-18 22:39:51 +01:00
Jeff Young 67b5d24995 Support ESC & Cancel for DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/5698
2020-09-18 22:14:00 +01:00
Jeff Young 73fc00ee69 Collapse VIA_TOO_SMALL and MICROVIA_TOO_SMALL into VIA_DIAMETER.
We'll also check too large in future....
2020-09-18 16:50:41 +01:00
Jeff Young f340636f70 When knocking out higher-priority zone use fill, not outline.
Also fixes a bunch of naming issues, primarily with lowercase for
protected variables, but also some for consistency with other parts
of the code.

Also changes the zone fill radio buttons in Board Setup to be more
generic referring to legacy vs. current, and to have tooltips.

Fixes https://gitlab.com/kicad/code/kicad/issues/5583
2020-09-18 16:45:41 +01:00
Jeff Young 90b147a914 Add DRC_ITEM definition for DRC_VIA_DIAMETER.
Fixes https://gitlab.com/kicad/code/kicad/issues/5695
2020-09-18 13:32:44 +01:00
Jeff Young 079bc52f6d Minor cleanup. 2020-09-18 13:14:08 +01:00
Jeff Young 53297c78a6 Don't eat commands we don't need in move tool.
This also fixes the dynamic ratsnest issue.

Fixes https://gitlab.com/kicad/code/kicad/issues/5692
2020-09-18 13:14:08 +01:00
Ian McInerney 34527630d0 Small cleanup 2020-09-18 11:17:37 +01:00
Ian McInerney a53f3899d4 Initialize variables properly 2020-09-18 11:17:37 +01:00
Ian McInerney aa0b0ca7e7 Fix some warnings in the cadstar importer 2020-09-18 11:17:37 +01:00
PJM 5feb4d3a7a Pcbnew: Check if user wants to warp mouse to origin of moved object
CHANGED: When moving a footprint, Pcbnew was always warping the mouse
to the origin of the moved object regardless of the state of the "Warp
mouse to origin of moved object" checkbox.  This MR now honors the
state of the checkbox when moving footprints.

Fixes https://gitlab.com/kicad/code/kicad/issues/5279
2020-09-18 02:47:59 +00:00
Jeff Young 81b523f9a4 Make sure the board itself is in the item map.
Also makes closing the DRC dialog a bit more foolproof.

Fixes https://gitlab.com/kicad/code/kicad/issues/5665
2020-09-18 00:53:14 +01:00
Jeff Young 8dd725469f Process properties command locally within drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/5612

Fixes https://gitlab.com/kicad/code/kicad/issues/5615
2020-09-17 22:32:22 +01:00
Jeff Young e202dba386 Be careful not to unload current project if settings imported from it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5684
2020-09-17 20:56:51 +01:00
Jeff Young 7b2a111a1c Implicit rules go first so that other rules will take priority.
Fixes https://gitlab.com/kicad/code/kicad/issues/5687
2020-09-17 20:13:39 +01:00
Jeff Young 0f3d2147aa Performance enhancements for DRC. 2020-09-17 20:13:39 +01:00
Jeff Young 8e530db633 Reporting must be kept inside the REPORT macro.
Reporting is run on a single clearance where performance doesn't
matter much.  Doing the string building during a DRC, however, kills
performance.
2020-09-17 20:13:39 +01:00
Jeff Young a3d65a2b43 Smoother progress reporting for DRC checks.
Also moves Messages tab out to an overlay, and restores the longer
messages now that messages are no longer a textbox in the upper right.
2020-09-17 20:13:39 +01:00
jean-pierre charras e8d09cd998 Pcbnew: fix incorrect creation of scripting/plugins in user directory.
Initialize Python scripting even if this directory cannot be created
It is not a mandatory dir, and not initializing python scripting can create crashes.

Fixes #5667
https://gitlab.com/kicad/code/kicad/issues/5667
2020-09-17 10:47:21 +02:00
jean-pierre charras a1439881b7 Fix a collision name with a Windows header. 2020-09-17 07:46:02 +02:00
Seth Hillbrand 45ca1709bb Unify scripting dirs and open user-based
This consolidates python scripting in two locations: the system-wide
package-based location and the user configuration location.  It also
updates the "Show Scripting Folder" action to open the user
configuration location instead of the package-based one.

Fixes https://gitlab.com/kicad/code/kicad/issues/5652

Fixes https://gitlab.com/kicad/code/kicad/issues/5115
2020-09-16 20:09:23 -07:00
PJM f3586ccd45 Pcbnew: Make 'GetBoundingBox' return correct answer when passed false
CHANGED: 'GetBoundingBox' has a variant that accepts a boolean that
determines if invisible text is included in the Bbox calculations.  The
'IsVisible' function for the value and reference strings doesn't
factor in if the layer it's on is visible or even in the PCB stackup,
so 'GetBoundingBox' returns a bbox that factors in invisible text
regardless of what it's passed.  This MR fixes that problem.

CHANGED: Refactored the original 'GetBoundingBox' function that doesn't
take a parameter.  It now just calls the variant that does take a
parameter and passes it 'true'.  The two versions had a lot of
duplicate code and this eliminates it.

Note: Issue 5629 might be better solved at the PCB module level, but this
does fix the known problems caused by it which were discovered in
'GetBoundingBox'.

Fixes https://gitlab.com/kicad/code/kicad/issues/5629
2020-09-17 00:59:07 +00:00
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 5109857883 Disable deselect net from main context menu
Right now we can't track the intended item to deselect
when there's an active selection already.

Having this feature available just from the appearance panel
should be fine.
2020-09-16 20:55:11 -04:00
Marek Roszko a82edb60fe Rotate the bounding box for hit tests on the fly 2020-09-16 23:29:21 +00:00
Marek Roszko 721c30e464 Make SetPosition and SetOrientation simply adjust the bounding box rather than continously recalculate it.
SetPosition is called on every pixel of a move operation which could be performance impacting on some systems.
2020-09-16 23:29:21 +00:00
Jon Evans 4a25db599e ADDED: Deselect net action
You can now deselect nets and netclasses (i.e. remove them from the
active selection) via the context menus in the appearance panel
2020-09-16 19:10:12 -04:00
Jeff Young 2b43ffd12d Better error reporting; better nullptr safety.
Also clears the marker lists before running a DRC, and sets
the drcRun flags afterwards so that the notebook tab counts
get updated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5659
2020-09-16 22:14:41 +01:00
Jon Evans db40e0c595 Fix dimension point editor ordering
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5656
2020-09-16 12:05:30 -04:00
Jeff Young ce3819abf8 Remove redundant clearances from DRC dialog. Fold progress bar in. 2020-09-16 16:06:29 +01:00
Jeff Young c0f83b30d3 Minor reformatting and performance improvement. 2020-09-16 16:04:28 +01:00
Tomasz Wlostowski b993a29695 drc: fix heap overflow 2020-09-16 13:45:12 +02:00
jean-pierre charras e137d61b29 Fix typo 2020-09-16 11:46:16 +02:00
jean-pierre charras c4b66e7cd3 drc/drc_test_provider: Fix a crash due to code change, at least on Windows.
The new code has not a lot of change, and is a bit cleaner.
2020-09-16 11:46:16 +02:00
Jeff Young 0ca09abbd3 Don't assume colour theme preview board will have a DRCEngine.
Fixes https://gitlab.com/kicad/code/kicad/issues/5650
2020-09-16 10:42:25 +01:00
jean-pierre charras 652a59b781 Fix null pointer use 2020-09-16 09:21:39 +02:00