Commit Graph

12377 Commits

Author SHA1 Message Date
jean-pierre charras b931883876 PANEL_FP_PROPERTIES_3D_MODEL: fix an issue when trying to edit a filename (MSW specific).
On Windows, FILENAME_RESOLVER::ValidateFileName() always returned a illegal filename test,
because the separators ('/' and '\') are in list of illegal chars in filenames on MSW.
2021-09-18 18:17:54 +02:00
Jeff Young 4779850c10 Add done messages to various plotters.
Fixes https://gitlab.com/kicad/code/kicad/issues/9172
2021-09-18 10:39:57 +01:00
Marek Roszko 847c9e32c8 Don't allow the draw via tool to activate in the footprint editor
Fix #9186
2021-09-17 23:01:16 -04:00
Jeff Young 34c2bd58d1 Disable ungroup where there are no groups in the selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/9182
2021-09-17 22:21:33 +01:00
Jeff Young 7b07b1650c Don't draw titlebar for untitled groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/9181
2021-09-17 22:01:17 +01:00
Jeff Young 5c07441e24 Remove Setup Dialog assignment of netclasses to buses.
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.

Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).

Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.

Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.

See additional comments in the bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 22:01:17 +01:00
Jeff Young 86ffb9a4bb Bring a little more consistency to the Text & Graphics Defaults panel. 2021-09-17 22:01:17 +01:00
Wayne Stambaugh d90094de39 Fix progress dialog main frame focus issue on Linux.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8718
2021-09-16 15:53:18 -04:00
Jeff Young 2479e1d7b1 Improve common settings property grouping.
Also moves apply-icon-scaling-to-fonts to its own checkbox.  (We used
to try to infer when to do it, but that turns out to be a rathole.)
2021-09-16 18:31:44 +01:00
Jeff Young fdd9df6dff Linear brightening doesn't work well for colours near white. 2021-09-16 14:17:52 +01:00
Jeff Young e2ce2e6ca9 Correct slight misalignment in Library Link fields. 2021-09-15 21:17:18 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

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

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Jeff Young 4447843dc1 Defensive coding around getting an OnUpdateUI before we're ready.
This appears to happen at least on GTK when the 3DFileResolver throws
up error dialogs when paths can't be found.

Fixes https://gitlab.com/kicad/code/kicad/issues/9163
2021-09-14 13:35:31 +01:00
Jon Evans 4d478d6f17 Fix ordering of initialization in length tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9161
2021-09-14 07:48:02 -04:00
Jeff Young b27b97809f Clean up several bugs in Graphics Cleaner.
See bug report for more details.

Fixes https://gitlab.com/kicad/code/kicad/issues/9150
2021-09-13 18:04:17 +01:00
Jeff Young 32e23d993e Formatting. 2021-09-13 17:18:58 +01:00
Jeff Young fdfecf5932 Don't push view control settings to the previous active tool.
See further comments in bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9147
2021-09-13 13:28:05 +01:00
jean-pierre charras 1cf1a23250 footprint.cpp: seriously speedup CoverageRatio() and GetCoverageArea().
Previoulsy, they calculated the area of polygons after using Simplify() and Fracture().
But polygon areas can be easily calculated without these transforms.
So they are just removed (they are really time consummig).
2021-09-13 13:41:36 +02:00
Marek Roszko daca9d21f2 Add dxf point import
Fix #9149
2021-09-12 19:38:52 -04:00
Jon Evans 814b6b8e86 Fix disabled layer error text 2021-09-12 17:14:24 -04:00
Jeff Young 62f7a09290 Smooth out a few minor inconsistencies in fonts & spacings. 2021-09-12 17:57:15 +01:00
Jeff Young a5247471f7 Expunge a bunch more fixed font specs from wxFormBuilder files.
Also removes the -1 sizing of the status bar on GTK and MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-12 13:53:12 +01:00
Jeff Young 0ac765c5bb Special case footprint zones which can be on "inner layers".
Also improves the reporting so that it reports the actual conflict
layer rather than just the first layer the object is on.

Fixes https://gitlab.com/kicad/code/kicad/issues/9144
2021-09-12 13:53:12 +01:00
jean-pierre charras 83d7c731d3 Pcbnew, plot poly in footprint: fix a bug introduced by my commit 3316f3
Polys in footprints were not moved, rotated to the right place.
2021-09-12 11:01:15 +02:00
Marek Roszko 74fd23f573 Add (off by default) build option to link kicad2step directly into pcbnew
Because debugging it separately is annoying.
2021-09-11 22:56:16 -04:00
Jeff Young 9c78e4cf54 Mac needs different font size handling than MSW & GTK.
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better.  The
other platforms need a more limited range of sizes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-11 23:40:31 +01:00
Jeff Young ed8b63505d Fix font scaling issues in StatusBar and Selection Filter.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-11 18:25:11 +01:00
Roberto Fernandez Bautista 625e56676a Add progress reporting to CADSTAR Schematic & PCB importers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8685
2021-09-11 17:50:19 +01:00
Jeff Young fbee62fc15 Tie font size scaling to when automatic icon scaling fails.
It appears that SetSymbolicSize() and ConvertDialogToPixes() fail
under the same circumstances.
2021-09-11 15:29:51 +01:00
jean-pierre charras 3316f3998a Rename BuildPolyPointsList() to DupPolyPointsList() and optimize code
to avoid multiple useless copies of the list of polygon corners in code.
2021-09-11 14:21:36 +02:00
Jeff Young ad59254be8 Another round of font sizing tweaks.
It appears that both strategies in the last commit worked, leaving us
with squared scaling.  The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.

Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8375
2021-09-10 21:46:13 +01:00
Jeff Young 7a822b55aa Another round of changes to attempt to fix the GTK font size issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-10 15:59:50 +01:00
Seth Hillbrand 29c2f3b7d4 Prevent jumping into disambiguation if moved
Moving points should not be overrided by disambiguation menu, so we
track where the disambiguation event started and only trigger the menu
if the mouse hasn't moved a full unit in x/y

Fixes https://gitlab.com/kicad/code/kicad/issues/9132
2021-09-09 16:24:18 -07:00
Seth Hillbrand fe9bdd41d9 Finalize modifier update
Update the preference pane info text

Also standardizes the use of "Option" instead of "Alt" for Mac users.

Fixes https://gitlab.com/kicad/code/kicad/issues/9129
2021-09-09 10:47:43 -07:00
jean-pierre charras 5e742d97b6 Export VRML: fix bug that prevent to merge 3D footprint shapes to the board file.
Fixes #9127
https://gitlab.com/kicad/code/kicad/issues/9127
2021-09-09 18:05:17 +02:00
Jeff Young 1a43515128 Repair multi-layer disabled layer tests. 2021-09-09 16:43:47 +01:00
Jeff Young bb2efa0649 Improve disabled layer test.
1) handle graphic items on copper layers
2) handle items on multiple layers
2021-09-09 15:20:48 +01:00
jean-pierre charras 567767346c VRML exporter: fix broken export, at least on msys2.
For an obscure reason, some floating values were fully broken. the small
change in code fixes this strange issue.
2021-09-09 16:08:51 +02:00
Jeff Young f0a26e4be0 Attempt to fix long-click issue (possibly just a typo).
Fixes https://gitlab.com/kicad/code/kicad/issues/9124
2021-09-09 12:20:30 +01:00
Jeff Young f013dbc7c4 More uniform handling of status fonts.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-08 21:34:22 +01:00
Wayne Stambaugh 3b16c38756 Coverity issue fixes.
Fix Coverity issues 157138, 338547, and 338716.
2021-09-08 14:51:27 -04:00
jean-pierre charras 30c001265b pcbnew, undo_redo.cpp: fix a logical bug that can hang in rare cases. 2021-09-08 13:06:55 +02:00
Seth Hillbrand c8b2e69332 Check if selection is primary tool
Previously, we were checking if the selection tool was the top of the
stack but this ignored many other "secondary" tools that might be
running such as the point editor.  These still allow the selection tool
to handle events such as clicks.  This change allows the selection tool
to handle clicks when it is the primary tool on the stack rather than
the top

Fixes https://gitlab.com/kicad/code/kicad/issues/9110
2021-09-07 10:42:01 -07:00
Wayne Stambaugh 4ee0b28ffc Coverity issue fixes.
Fix Coverity issues 338623, 338716, and 338717.
2021-09-07 13:38:56 -04:00
Seth Hillbrand c816168e42 Fix crash when drawing item
When drawing before commit, the items do not have a board and therefore
no BDS.  In these cases, take a decent default until committed
2021-09-07 09:08:44 -07:00
Jeff Young 9cf7c7800b Use same text positioning algorithm in LibEdit and Eeschema.
Also fixes some uninitialized variables in PCB painter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8947
2021-09-07 12:33:06 +01:00
Jeff Young 2ac03e2cdb Change Loss Tg to Loss Tan.
We'll need Tg in the future for glass transition temp.

Fixes https://gitlab.com/kicad/code/kicad/issues/4734
2021-09-07 10:49:17 +01:00
Jeff Young 1792a985a7 Use board's maxError value when possible. 2021-09-07 00:14:18 +01:00
Michael Kavanagh 0e3c79d3b2 Remove inappropriate icons
Icons should be used sparingly to draw attention to the most used actions
2021-09-06 21:23:52 +00:00
Seth Hillbrand 0f38a35531 Be sure to stop the timer when triggering d-click
Some mice apparently trigger double-click without triggering a click, so
stop the timer when we receive this event

Fixes https://gitlab.com/kicad/code/kicad/issues/9106
2021-09-06 12:27:31 -07:00
Seth Hillbrand 343dbf0f5b Change default 45° hotkey to shift-space
This requires enabling the space key to be bound with shift, which was
disabled based on an overbroad limit of only allowing shift to be mapped
with letter keys
2021-09-06 12:18:29 -07:00
jean-pierre charras 36048fa436 OPENGL_GAL::DrawArcSegment(): use a better number of segm to approximate the arc.
Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes #9101
https://gitlab.com/kicad/code/kicad/issues/9101
2021-09-06 16:36:47 +02:00
Seth Hillbrand 56ccaf6482 Constrain move tool when set
Move tool works slightly differently from other tools when figuring out
new locations.  This uses the global 45 enable flag to set proper item
locations when the user is requesting a 45° constraint on movement
2021-09-06 07:05:25 -07:00
Seth Hillbrand 86725db758 Ensure doInteractivePlacement enforces snap option
Fixes https://gitlab.com/kicad/code/kicad/issues/9105
2021-09-06 06:36:33 -07:00
jean-pierre charras d2bff137ee .kicad_pcb file: fix incorrect keyword stored for some (not all) PAD properties.
( a copy-paste error? )
Fixes #9102
https://gitlab.com/kicad/code/kicad/issues/9102
2021-09-06 09:15:18 +02:00
Seth Hillbrand 240c3b75c4 Move selection disambiguation to long-click
This standardizes selection tools in SELECTION_TOOL class to be able to
handle a long-click as asking for a non-heuristic disambiguation menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/8490
2021-09-05 13:42:51 -07:00
Seth Hillbrand 092cdc0bb5 Move 45° limit to hotkey
This assigns the "Tab" key to a general pcbnew 45° limitation.  Limit
can be enabled/disabled using context menu as well.

Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.

Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
2021-09-05 13:42:51 -07:00
Jeff Young 69a31f41b8 Fix typo.
Last commit added the correct code, but failed to delete the buggy code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9090
2021-09-05 21:23:55 +01:00
Jeff Young 921b6c826b Fix another disappearing string on Mac. 2021-09-05 21:23:55 +01:00
Marek Roszko 36bcff34f7 Label the three track and via properties for UX 2021-09-05 08:54:45 -04:00
Jeff Young 59c15842f8 Exclude formatting chars from text width approximation.
Fixes https://gitlab.com/kicad/code/kicad/issues/9080
2021-09-04 22:09:32 +01:00
Jeff Young 6818539f6d Repair is-selected logic in various global editors.
Fixes https://gitlab.com/kicad/code/kicad/issues/9090
2021-09-04 18:10:25 +01:00
Jeff Young a397e85589 Implement PTH/NPTH/courtyard collision tests.
Fixes https://gitlab.com/kicad/code/kicad/issues/9081
2021-09-04 00:16:26 +01:00
jean-pierre charras e2a1e5d4a1 DIALOG_EXPORT_STEP: fix regression: missing default filename initilization 2021-09-03 16:22:32 +02:00
Seth Hillbrand e03257b55f Allow close placement of stitching vias
When placing a stitching via for a bypass capacitor, it is common to
place it close to the relevant pad.  If the via does not have the
correct net, this will violate DRC and be prevented.

Checking for zone-based net assignments allows the workflow to proceed
2021-09-01 15:52:35 -07:00
Seth Hillbrand f14e5b61b3 Ensure newly added pads are counted
When adding a new footprint, don't delete the single-pad nets until you
check for the net being added as part of the footprint

Fixes https://gitlab.com/kicad/code/kicad/issues/9053
2021-09-01 15:12:28 -07:00
Seth Hillbrand e0011fcd93 Display a nice error message instead of asserting
When we mess up, it will be nice to not lose users' data.  This requests
a bug report if the netlist parsing breaks instead of throwing
2021-09-01 12:02:06 -07:00
Seth Hillbrand 8a305eec32 Remove broken RefDesStringCompare
This function attempted a poor-man's natural compare but it assumed
specific structure of the string.  This broke for strings with
numberings that looked like decimals.

Instead, we use our natural string comparison function and remove the
references to this older function and its similar elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/9067
2021-09-01 11:48:01 -07:00
Jeff Young 04fa678265 Impleent persistence for no-connect pad setting.
Also moves rotation increment from a display property to and edit
property.

(Both issues were discovered while working on a 7.0 feature.)
2021-09-01 00:00:12 +01:00
Jeff Young 2cdd3c9ebf Work-around incorrect spacing (and order) of buttons on Mac. 2021-08-31 22:39:25 +01:00
jean-pierre charras 8fa04eeb75 FP_TEXT::TransformShapeWithClearanceToPolygon(): fix broken rotation of the shape.
Only the FP_TEXT shape must be rotated, not the full buffer used for storage.
Fixes #9057
https://gitlab.com/kicad/code/kicad/issues/9057
2021-08-31 17:04:03 +02:00
Jeff Young b5a3385ea9 Overhaul file locking system.
See bug report for details.

Fixes https://gitlab.com/kicad/code/kicad/issues/8919
2021-08-31 15:04:31 +01:00
jean-pierre charras 6c7c9ca50c Fix compil warnings (UNDO_REDO::GROUP renamed to UNDO_REDO::REGROUP to fix
collision name with a widows header on msys2)
2021-08-28 11:44:01 +02:00
qu1ck 0f7c0e3872 PCM implementation 2021-08-27 21:11:47 +00:00
qu1ck 78ab69027d Add 3rdparty/plugins to plugin search 2021-08-27 21:11:47 +00:00
Mike Williams 10247c268e Pcbnew: implement Find Next
Moves all of the find dialog control out of the selection tool similar
to the schematic editor. Dialog is also non-modal now to match the
schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8966
2021-08-27 18:15:36 +00:00
Mike Williams 0b2e66d3b7 Infobar: Don't use animations on Windows/GTK
Seems to cause issues on Windows where the animation locks the screen.
Doesn't effect Linux, possibly because wxWidgets uses a native GTK
infobar that doesn't animate anyway.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8987
2021-08-27 17:38:16 +00:00
Jeff Young 436ad0ede7 Add missing token to DRC rule parser.
Fixes https://gitlab.com/kicad/code/kicad/issues/9041
2021-08-27 12:49:07 +01:00
Mike Williams 43194dff72 Pcbnew: don't fallback to software rendering after changing footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8915
2021-08-26 18:00:33 +00:00
jean-pierre charras ee5f9034f7 pcb parser: ensure the parser is reinitialized before parsing a new fp file
Because the same parser is used to read all footprint files of a library,
the parser must be reinitialized (internal variable cleared) before reading
a new file, otherwise the previous parser state is applied to the next file.
Fixes #7627
https://gitlab.com/kicad/code/kicad/issues/7627
2021-08-26 19:38:20 +02:00
Jeff Young f4905cb1ae Cherry-pick fix from 7.0 branch back to master.
Fixes https://gitlab.com/kicad/code/kicad/issues/9005
2021-08-25 20:14:11 +01:00
Jon Evans 5f2d238c93 Work around GTK issue with wxSearchCtrl
Also remove redundant icons in LIB_TREE (recent GTK
search controls have an icon built-in)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9019
2021-08-24 23:04:28 -04:00
Jeff Young 2b3477ca28 Handle RGBA conversion to hexadecimal format for wxWidgets 3.0 2021-08-25 02:40:17 +01:00
Jeff Young f926eab76d Cherry-pick Footprint Properties dialog fix from 7.0 branch.
Fixes https://gitlab.com/kicad/code/kicad/issues/9021
2021-08-25 02:40:17 +01:00
Jon Evans a7bd621419 Remove checkboxes that can't be unchecked (part 1)
The checkboxes for copper layers should probably also be removed
but leaving them for now since they direct the user to the right
place to disable copper layers.
2021-08-24 20:29:03 -04:00
Tomasz Wlostowski a03b6f6fc9 router: use tail start point when saving the FIXED_TAIL
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8771
2021-08-25 00:36:34 +02:00
Roberto Fernandez Bautista 4c17b7ab46 WALKAROUND::Route Check if path is empty before stepping
singleStep expects a path with at least one point.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9020
2021-08-24 20:17:19 +01:00
Jeff Young a02ea1609b A more robust solution to the 3D color opacity issue.
(This also fixes a typo in the previous fix that assigned the opacities
backwards.)
2021-08-24 11:24:25 +01:00
jean-pierre charras a9f092b370 Pcbnew, Printing system: fix broken print of pads on tech layers.
To print pads on tech layers, view layers LAYER_PAD_FR, LAYER_PAD_BK and
LAYER_PADS_TH must be always enabled, and items we do not want print on these layers
must be printed using a invisible color (opacity = 0.0)
2021-08-24 10:27:53 +02:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Jeff Young baab2e6119 Attempt to fix SWIG issue. 2021-08-23 22:04:31 +01:00
Jeff Young 21f2b235ce Rework stackup colors a bit to support opacity for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/9012
2021-08-23 20:00:17 +01:00
Jeff Young fec34e8dd8 Get rid of an extraneous layer parameter.
Also adds a bit of nullptr safety.
2021-08-23 20:00:17 +01:00
Jeff Young 6f5e602df9 Fix solder mask plotting issues.
1) Don't plot all footprint texts for each footprint graphic item.

2) Correctly handle multi-layer zones.
2021-08-23 20:00:17 +01:00
Jeff Young 9770962ab4 Fix logic bug in rule processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/9011
2021-08-22 20:16:58 +01:00
Jeff Young 1fa5e43597 Fix some dodgy logic in clearance overrides. 2021-08-22 03:24:51 +01:00
Jeff Young b9ffe2aca8 Don't capture stack-defined lambdas by reference. 2021-08-21 22:49:57 +01:00
Seth Hillbrand 3b3cb88ad9 Remove shadowed variable in lambda 2021-08-21 14:01:20 -07:00
Jeff Young eb85af3366 Don't capture references to local stack variables. 2021-08-21 21:40:17 +01:00