Commit Graph

5780 Commits

Author SHA1 Message Date
Seth Hillbrand a852286eb5 Cleanup compile warnings 2022-06-21 17:04:56 -07:00
Fabien Corona 976670e987 Move 3D controls to a new class 2022-06-21 23:38:22 +00:00
Miklós Márton f2382a7bd1 Add Make selected active/inactive actions to the symbol libraries
context menu

Fixes #11372
2022-06-21 23:32:02 +00:00
Jeff Young 231ac567b8 Bug fixes for printing vias.
Blind/buried and microvias didn't get their layers trimmed properly,
nor did through vias with dropped pads.

Fixes https://gitlab.com/kicad/code/kicad/issues/11851
2022-06-19 11:58:21 +01:00
jean-pierre charras f20cb0fda8 Activate teardrops: remove advanced config option and add teardrop keywords in files. (the ability to read teardrop keywords was added some time ago) 2022-06-17 19:42:27 +02:00
jean-pierre charras c2707e0c8d Add some missing icons. 2022-06-17 17:51:19 +02:00
Jeff Young a7cb985b80 Don't allow PCBNew netclass cols in Eesceham and vice versa.
Fixes https://gitlab.com/kicad/code/kicad/issues/11804
2022-06-13 21:28:35 +01:00
jean-pierre charras 9fd5ee5a2f paper min size set to 1 inch (previously 0.1 inch, very small indeed)
Avoid using magic numbers in file pcb_parser.cpp.
Fixes #11807
https://gitlab.com/kicad/code/kicad/issues/11807
2022-06-13 17:51:29 +02:00
jean-pierre charras fa5150b05f Add bitmaps paste_special to context menu. 2022-06-13 14:40:21 +02:00
Jeff Young 52bc2511cd Add a radioButton mode to IMAGE_BUTTON.
Fixes https://gitlab.com/kicad/code/kicad/issues/11797
2022-06-12 20:09:46 +01:00
Jeff Young f22cf1cc3a Fill in missing bits of LAYER variable for printing/plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/11788
2022-06-10 22:38:01 +01:00
Seth Hillbrand 4790257616 Don't break alphabetical sorting on search
When using the "Filter" search for footprints/symbols, the least
surprising outcome is that the window filters the existing
(alphabetically sorted) list but does not change the display order based
on scoring.

This also needs to adjust the fix for
https://gitlab.com/kicad/code/kicad/-/issues/259 as that assumed the
selected element would be the first below the group (not the case if we
are sorting alphabetically)

Fixes https://gitlab.com/kicad/code/kicad/issues/11746
2022-06-10 11:48:47 -07:00
Alex 0e2d3236b5 OpenGL: Fix SetSwapInterval logic.
- Don't use GLX extension functions unless they are supported on the
connection. GLEW only checks for client library support.

- Don't try to set swap interval using glXSwapIntervalSGI when vsync is
not requested.

Fixes https://gitlab.com/kicad/code/kicad/issues/11751
2022-06-09 19:29:57 +00:00
Jeff Young bf71cada4e ADDED: User viewports for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5724
2022-06-06 22:24:02 +01:00
Jeff Young 244042ce51 Keep footprint selection in Symbol Chooser history list.
Fixes https://gitlab.com/kicad/code/kicad/issues/1841
2022-06-06 22:24:02 +01:00
Jeff Young d0023add81 Code clarity. 2022-06-03 23:27:10 +01:00
Jeff Young d31bd4ea3e Use default text properties for textboxes.
Also make sure text is mirrored when placed on back of board.

Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-03 18:48:09 +01:00
Mike Williams 8d51b6b6d3 Schematic: Add icons for Any/90/45 angle modes
Also add a dark mode icon for existing 45hv icon.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11332
2022-06-03 15:04:52 +00:00
Jeff Young 7ede2c70bd Performance enhancements for hotkeys.
Fixes https://gitlab.com/kicad/code/kicad/issues/11592
2022-06-03 00:36:33 +01:00
Mike Williams 857990a883 Hierarchy: turn into a left side pane
Drop auto-closing option as well.
2022-06-02 21:56:17 +00:00
Jeff Young de12c63de6 Repair point editing of rotated text boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11432
2022-06-02 10:42:57 +01:00
Jon Evans f4372a2de9 UNIT_BINDER should support long long ints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10870

(cherry picked from commit eb1164fc93)
2022-05-31 21:54:51 -04:00
Jeff Young abba1b04bd Add "Enter Sheet" to Sheet tool (context menu & double-click).
Fixes https://gitlab.com/kicad/code/kicad/issues/11531
2022-05-30 14:08:26 +01:00
Jeff Young 5cae4cf918 Give zoom tool its own menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/11702
2022-05-30 11:44:02 +01:00
Jeff Young 155620cc9a Move H/V/45 mode from zone properties to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
Mike Williams dabd42bbc4 Schematic: Automatic Symbol Annotation 2022-05-27 15:54:00 +00:00
Roberto Fernandez Bautista 55f22c526a Fix annotation of incomplete multi-unit symbols and re-annotation of duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11496
2022-05-26 09:23:36 +00:00
Seth Hillbrand 5cd91a952f Adding Ukranian language option
Ukranian translations added via weblate.  This enables the menu option
to view them
2022-05-25 16:37:48 -07:00
Mario Luzeiro ef4f0b49fc 3D-Viewer, raytracing: implement bevel edges on item layers 2022-05-25 00:11:46 +00:00
Jeff Young fa11e1c097 Take text height into account as well as thickness for knockout margin.
Also centralizes calculation so all clients will get the same answer.

Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-20 12:29:01 +01:00
jean-pierre charras 57e59a4959 Pcbnew, on line DRC when moving footprints: add visible collisions between courtyards 2022-05-20 12:58:05 +02:00
Jeff Young 23fb4c7433 Uniformly use a single facility for location-less prime events.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
Jeff Young 38e5faf21b Overhaul bitmap text for performance.
Also adjusts metrics to better match stroke font.

Also removes text-halo highlighting as it's too expensive to re-render
when the zoom changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/11460
2022-05-14 20:09:54 +01:00
jean-pierre charras bf4b3a1ff8 Fix a compil warning (due to a bug in code after last change) 2022-05-14 16:32:04 +02:00
Marek Roszko 88c7322a0d EDA_TEXT Get/SetTextSize should use VECTOR2I 2022-05-14 08:16:15 -04:00
jean-pierre charras 20d1d0705e Fix a few issues related to field names and their translation. - Do not use translated field names outside strings displayed in dialogs. - fix code that does not work well with default locale. - fix some (not all) I18n issues in DIALOG_UPDATE_SYMBOL_FIELDS. 2022-05-13 11:45:37 +02:00
Marek Roszko 8288f24264 Move all the shaders to glsl files (and fix the processor more) 2022-05-12 23:37:44 -04:00
Marek Roszko f85251ef75 Fix eda_doc not looking for schematic locally
It looks like this was overlooked by Jeff in 2020 not realizing eda_doc isn't built under eeschema but common in cc9ac37a0e
2022-05-10 21:28:48 -04:00
Mike Williams b7a77a9498 Schematic: Add CSV export to Symbol Fields Table 2022-05-09 12:02:12 -04:00
jean-pierre charras ee4e50518f EDA_LIST_DIALOG: fix a crash due to use after delete data.
A list of wxArrayString was used in dialog, but not stored in this dialog.
(and this list was deleted by the caller)
A copy is now stored in dialog.
Fixes #11543
https://gitlab.com/kicad/code/kicad/issues/11543
2022-05-03 17:21:34 +02:00
Jeff Young 47e002a33d Add font to status bar for text objects. 2022-04-26 18:52:53 +01:00
Jeff Young 85680886f8 Adjust outline font SCH_TEXT positioning so it better matches SCH_FIELD text. 2022-04-26 12:52:29 +01:00
Jeff Young 781bff9bff Minor cleanup. 2022-04-24 23:54:01 +01:00
Jeff Young 90bfe2d94b Remove Save Copy As from fp editor, and rename to Save a Copy elsewhere.
It's still used by Eeschema and PCBNew when not in stand-alone mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/9185
2022-04-24 19:46:57 +01:00
Jeff Young b4b16e7e0f Adjust overbar height for outline fonts. 2022-04-23 22:15:39 +01:00
Jeff Young fb1e1aec9a Add tab processing for outline fonts. 2022-04-20 12:00:19 +01:00
Jeff Young 7f4f5f2882 Save and re-load query string in Choose Symbol dialog.
While this has been requested on its own, it's primarily done here
because wxWidgets decided to send a SEARCH_CANCEL from a wxSearchCtrl
when hitting <ENTER> if the search control holes the empty string.
This causes us to not do a symbol instert in the Chooser dialog.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7699
2022-04-17 00:33:56 +01:00
Marek Roszko 392ed5fecd Add policy to enable/disable pcm 2022-04-12 10:08:34 -04:00
Marek Roszko f88e0481c8 Change the behavior of ACTION_MENU::Add to require clones if required outside the function
This reverts commit 2a5769607f.
2022-04-11 19:03:01 -04:00
jean-pierre charras ac8e2d0768 Ensure "Open Recent" and "Clear files" menu titles are updated after language change. 2022-04-11 11:09:05 +02:00
Marek Roszko 5bb2cdf73d Revert "Stop leaking submenu items"
This reverts commit 34c70a51ea.
2022-04-10 22:33:43 -04:00
Marek Roszko 34c70a51ea Stop leaking submenu items
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
Roberto Fernandez Bautista 0015574a60 ${SHEETNAME} represents the sheet name + introduce ${SHEETPATH}
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block

ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".

To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
2022-04-09 15:45:58 +01:00
Jeff Young 007906cd16 Fix a degeneracy bug in arc collisions.
This also fixes a failure to use the correct effective width for
shapes (which might, for instance, inherit their widths from schematic
defaults, netclasses, etc.).

Fixes https://gitlab.com/kicad/code/kicad/issues/11358
2022-04-08 16:15:58 +01:00
Jeff Young 722b2588f4 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087
2022-04-08 11:40:53 +01:00
Jeff Young 079d4a603a Improve transparency handling while plotting.
Only SVG can actually handle transparency, but we should at least mimic
the color value of other transparent fills by blending with a (presumed)
white paper.

Fixes https://gitlab.com/kicad/code/kicad/issues/11304
2022-04-08 11:40:53 +01:00
Jeff Young dead84e7a1 A right-to-left single-char sel followed by typing leaves cursor the same.
Fixes https://gitlab.com/kicad/code/kicad/issues/11349
2022-04-07 11:51:58 +01:00
Mark Roszko f0f33ef1d3 Introduce sentry for crash data collection 2022-04-02 01:21:55 +00:00
markus-bonk 1a9ef4bd0f Add support for using a SpaceMouse to pan & zoom in the schematic editor. 2022-03-31 19:03:41 +00:00
Jeff Young e8a543f1ea Colors for text in PL_Editor and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/1952
2022-03-31 19:43:56 +01:00
Wayne Stambaugh c0d8657d97 Plot on all layers prep work.
We only need one bottom to top layer sequence definition.

Plot a sequence of layer IDs (LSEQ) in the order of the sequence.

Add helper method to layer set (LSET) to create a sequence of layer IDs
using another sequence for ordering.
2022-03-29 16:08:23 -04:00
Mike Williams 2a726a882f Schematic: new feature, force 45 degree lines
* New modes to force 45 deg angle at beginning or end of line

* Backspace will undo most recent segment added

* / will toggle posture of 90 and 45 degree lines

* Added alg::signbit for convenience

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10869
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9175
2022-03-28 16:07:23 -04:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Jeff Young d5533e7999 ADDED unit-filtering for pin table.
Fixes https://gitlab.com/kicad/code/kicad/issues/9382
2022-03-26 11:53:48 +00:00
Jeff Young 92a229eec7 ADDED separate user-defined color for page limits.
Fixes https://gitlab.com/kicad/code/kicad/issues/5271
2022-03-24 14:11:41 +00:00
jean-pierre charras 21144481d2 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196
2022-03-22 10:32:36 +01:00
Seth Hillbrand 9722a05820 Attempt to fix the Mac DPI grid mixing
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows.  This attempts to
rectify the situation by avoiding DPI changes for Mac builds.

Fixes https://gitlab.com/kicad/code/kicad/issues/10586
2022-03-22 00:02:05 +00:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
jean-pierre charras 09d8ac7d7c Zoom wxChoice in horizontal toolbar: display the actual or nearest zoom level. 2022-03-20 18:41:38 +01:00
Seth Hillbrand 442aae19d9 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

Fixes https://gitlab.com/kicad/code/kicad/issues/11114
2022-03-16 17:30:01 -07:00
Jeff Young e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young ce21da8cbb Select all when UNIT_BINDER is a token rather than a string.
Fixes https://gitlab.com/kicad/code/kicad/issues/9757
2022-03-16 14:56:32 +00:00
jean-pierre charras 016af235db Pcbnew: add a GAL layer (LAYER_LOCKED_ITEM_SHADOW) to draw markers on locked footprints 2022-03-09 17:54:58 +01:00
jean-pierre charras e7f379c31d Pcbnew, Knockout texts: fix issues seen with rotated texts.
Fixes #11085
https://gitlab.com/kicad/code/kicad/issues/11085
2022-03-09 11:22:05 +01:00
Jeff Young 293021c58c ADDED: knockout pcb and fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +00:00
Jon Evans 6d82490b59 Add dark mode assets for text properties; teardrops
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10754
2022-03-07 23:15:54 -05:00
Ola Rinta-Koski 6196f2bdf0 Version info: report all font libraries 2022-03-07 14:01:37 +00:00
Jon Evans cb6d6d7ef4 Settings: allow multiple project access from Python standalone
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540

(cherry picked from commit 1394509734)
2022-03-05 13:04:19 -05:00
Seth Hillbrand cd7141fd10 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

Fixes https://gitlab.com/kicad/code/kicad/issues/10442
2022-03-04 15:20:31 -08:00
Seth Hillbrand 548936bb22 Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)

(cherry picked from commit 79b6991d7b)
2022-03-02 16:33:28 -08:00
Jeff Young 6b806bbe9c Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 18:28:39 +00:00
Jeff Young b55bda8d6f Font support for drawing sheet editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10306
2022-02-28 18:05:26 +00:00
Jeff Young d299ddbc7e Cleanup. 2022-02-27 12:05:39 +00:00
Jeff Young 98f4b1d16c Make gcc (or linux?) happy. 2022-02-26 22:56:10 +00:00
Jeff Young 941d7f94ad Use safer UTF8 conversion routines to prevent crashes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10982
2022-02-26 19:03:00 +00:00
qu1ck b06c2585d9 Change GetEffectiveTextShape() to return outline
instead of triangulated polygon
2022-02-26 00:55:07 +00:00
Jeff Young 107067ad05 On-the-fly translations for Grid and Zoom menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/10961
2022-02-25 17:36:35 +00:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young d465eb6425 ADDED: automatic zone refilling.
This is for the out-of-box experience for novice users.  It is presumed
that folks with larger more complicated boards will turn it off.

Fixes https://gitlab.com/kicad/code/kicad/issues/6413
2022-02-24 18:16:45 +00:00
Jeff Young cb16ad7557 Debounce layer visibility buttons and fix issues with FP Editor. 2022-02-23 17:52:08 +00:00
Jeff Young 41f6e634c6 Partially integrate grid snapping with constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Marek Roszko 0b46c75197 Simplify locale data path setting... 2022-02-21 13:08:29 -05:00
Marek Roszko ad251b7b8c Simplify KICAD6_TEMPLATE_DIR default
The search_stack method is bugland

Fix https://gitlab.com/kicad/code/kicad/-/issues/10119
2022-02-21 12:22:23 -05:00
jean-pierre charras d2cf68bcdd Plotters: add plot Arcs using EDA_SHAPE or center, start point and end point.
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes #10914
https://gitlab.com/kicad/code/kicad/issues/10914
2022-02-20 17:17:20 +01:00
Jeff Young d9507dbaf4 We handle variable replacements elsewhere.
The markup parser needs to ignore them so they get rendered when we're
not doing replacement.
2022-02-15 23:05:22 +00:00
Jeff Young 8e26946567 Don't shrink progress reporter when message changes; only grow. 2022-02-15 19:19:02 +00:00
Jeff Young 98b9c6e2a1 Better progress reporting and a slight performance boost on commit. 2022-02-15 12:20:34 +00:00
Mike Williams 9c59c4ee12 Schematic: orthogonal drag bends should depend on move direction
Prevents overlapping lines when possible.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10844
2022-02-14 22:52:34 +00:00
jean-pierre charras f8d6dd1efd Gerbview: fix a long standing issue: negative objects are now correctly printed. 2022-02-12 11:44:34 +01:00
dsa-t 68655540eb Clamp cursor to limits of coordinates representation
Also improves large distance handling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
2022-02-11 16:42:52 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
Werni 946f62d949 Add separate wildcard for OrCAD netlists 2022-02-11 09:24:20 +00:00
Jeff Young 082c6f5bd6 Make sure plotter uses default font when specified. 2022-02-10 20:33:06 +00:00
Mike Williams a5e8575091 Eeschema: Implement orthogonal dragging
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1956
2022-02-10 18:38:40 +00:00
Jeff Young 2250211ebf More wxT-ification. 2022-02-09 17:04:32 +00:00
Ola Rinta-Koski 44c93e48e9 Markup parser fix: subscript/superscript/overbar handling 2022-02-08 18:50:53 +00:00
Jeff Young 5ce559176d Overhaul the font metrics calcs for overbar, italics and bboxes. 2022-02-07 17:36:40 +00:00
jean-pierre charras a37a7aa1d5 move a misplaced include 2022-02-07 08:22:43 +01:00
Marek Roszko 1f8d101b1d Fix color4d distance return type 2022-02-06 21:05:44 -05:00
Seth Hillbrand 57df1b469a Allow dialogs to force evaluation of UNIT_BINDER
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)

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

(cherry picked from commit 4c81307391)
2022-02-04 10:04:54 -08:00
Jeff Young 42917874dd Add duplicated items to parent group.
Fixes https://gitlab.com/kicad/code/kicad/issues/10155
2022-02-04 14:26:57 +00:00
jean-pierre charras ac7cbcce61 WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
2022-02-04 12:36:27 +01:00
Seth Hillbrand 3badd53a96 Setup selection when repeating
We need the item to be currently selected when repeating the last symbol
insert.  This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions

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

(cherry picked from commit 7642a9db79)
2022-02-03 17:09:59 -08:00
Jeff Young 0634cf261a Don't try to move bounding box caches. 2022-02-01 21:55:09 +00:00
Jeff Young 63a3b1e20a Estimate outline font thickness for DRC readability checks. 2022-02-01 12:01:04 +00:00
Jeff Young f3cd36d1d7 Bring EEschema textboxes in line with PCBNew's.
Also adds Border checkboxes and fixes a bunch of bugs.
2022-01-31 21:46:40 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
jean-pierre charras 2900910cdd fix a qa test after code change. 2022-01-29 15:22:06 +01:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Jeff Young 0036f44e37 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
2022-01-28 21:38:15 +00:00
jean-pierre charras 5b8eb8f9ec SVG plotter rework: use mm as units in file. Remove useless inch option.
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
2022-01-28 19:33:51 +01:00
markus-bonk b263e89dfe Enable 3D mouse support in Footprint viewer.
The 3D mouse support is  moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
This allows all PCB_BASE_FRAME derived windows to have 3D mouse enabled
2D navigation support.
2022-01-28 12:21:42 +00:00
markus-bonk 47603fbc76 Wx_view_controls: Allow two input devices to simultaneously pan & zoom
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
Jeff Young dcf0928671 Formatting. 2022-01-23 18:14:07 +00:00
Marek Roszko 0fc8197474 Add the new icon_kicad_nightly to the png build 2022-01-23 09:21:06 -05:00
jean-pierre charras 1b42152ba0 Teardrops: store parameters in BOARD_DESIGN_SETTINGS. 2022-01-23 10:57:08 +01:00
Jeff Young 6dc8cd3f18 Add FreeType version to version info.
Fixes https://gitlab.com/kicad/code/kicad/issues/10393
2022-01-21 13:21:21 +00:00
Jeff Young 854987f663 Remove unit-less angles from geometry manager APIs. 2022-01-20 21:10:04 +00:00
Jeff Young fbab335128 Retire DPOINT and DSIZE. 2022-01-20 21:10:04 +00:00
Jeff Young 67eb3116ce Remove DPOINT from drawing sheet stuff. (Use VECTOR2D instead.) 2022-01-20 21:10:04 +00:00
Seth Hillbrand 4c8f556b80 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

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

(cherry picked from commit 6810479a19)
2022-01-20 10:10:06 -08:00
Jeff Young 9d5322cfdf Move rotation angle increments to UNIT_BINDER and EDA_ANGLE. 2022-01-19 15:15:33 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young d4ff829c26 Trace logging for fonts. 2022-01-18 14:08:47 +00:00
Jeff Young e37ca2f757 Remove dead code. 2022-01-18 01:40:03 +00:00
Thomas Pointhuber 2cc9517cfd altium: Allow extraction of names of footprints stored in *.PcbLib file
See: https://gitlab.com/kicad/code/kicad/-/issues/10274
2022-01-17 19:51:51 +01:00
Jeff Young 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young 5cc3368b14 Fix bounding boxes and hittesting for arcs in eeschema. 2022-01-16 23:54:59 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
Ola Rinta-Koski da65fe0469 Font outline decomposition fixes 2022-01-15 12:51:09 +00:00
Jeff Young 862d8ce48d Default TEXT_ATTRIBUTES angles to tenths of a degree, not radians. 2022-01-15 01:30:04 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Seth Hillbrand 22a77d3556 Move EDA_ANGLE to KiMath lib
KiMath should only depend on itself not on other elements in the tree
2022-01-14 17:12:24 -08:00
Jeff Young 93229c37bb Fix compile issue on Mac.
See https://kicad.zulipchat.com/#narrow/stream/216775-core-team/topic/Compile.20error
2022-01-14 20:53:25 +00:00
Jeff Young b3c324b352 Objects on UNDEFINED_LAYER should return an empty layerset.
Fixes https://gitlab.com/kicad/code/kicad/issues/10417
2022-01-14 19:49:39 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young 037dfb6e01 Move FP_TEXT::KeepUpright() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Seth Hillbrand e7d0318fb2 Plot fonts in outline mode, not triangulated
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
2022-01-13 17:04:14 -08:00
Mark Roszko 3aff953c9c Quietly put the missing [] in the shared_ptr 2022-01-13 13:50:57 +00:00
jean-pierre charras d0f2c20235 Define our kicad font name only once, and do not translate it.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
2022-01-13 14:32:55 +01:00
Marek Roszko 15dc1b3a38 Remove no longer used boost header 2022-01-13 07:12:13 -05:00
Marek Roszko 9965748795 Use std::shared_ptr in place of boost::shared_array
It works the same here
2022-01-13 07:10:47 -05:00
Jeff Young 6ccfec0553 Layer handling for copper sliver exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/10147
2022-01-11 22:28:24 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Ola Rinta-Koski dcab2833b8 PEGTL 2.x->3.x 2022-01-10 23:22:23 +00:00
Seth Hillbrand d5faac7614 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

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

(cherry picked from commit 55020c2b89)
2022-01-10 13:39:39 -08:00
jean-pierre charras d42514ad30 Add code and dialog to create/add/remove teardrops, step 1 2022-01-10 20:04:40 +01:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
jean-pierre charras 72cdba44cb Fix compil issue on c++17/msys2 (and perhaps some other compilers) 2022-01-10 09:15:26 +01:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 78cac128b7 Careful: symbol fonts have no language.
Also a bit of clean up to shut up a false-positive in Coverity (and
clangd) on dereferencing a possibly (not) nullptr.
2022-01-09 11:34:20 +00:00
Jeff Young a4349ae638 Cleanup and error reporting for fonts. 2022-01-09 11:34:20 +00:00
Seth Hillbrand f4d12fb19c Force Mesa to use its own call
Mesa does not support adaptive swapping but will sometimes report that
it does.  This prevents Mesa drivers from testing (and segfaulting) the
limits of their call

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

(cherry picked from commit 100cf757fe)
2022-01-08 17:13:52 -08:00
Marek Roszko 5621e49b21 vcpkg locates ft2build.h in the root of /include and not the freetype2 subfolder 2022-01-08 12:35:40 -05:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +00:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
Jeff Young a2030a5956 GUI for font selection. 2022-01-08 16:47:45 +00:00
Ola Rinta-Koski 9b406c1da4 Outline font support. 2022-01-08 16:47:45 +00:00
jean-pierre charras 9c29cc945c prepare teardrops, round 2 2022-01-08 16:56:41 +01:00
Seth Hillbrand 3a730361d3 Fix swap interval checking
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support.  This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)

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

(cherry picked from commit 7c9340f855)
2022-01-06 10:53:44 -08:00
Ian McInerney bd828f598c Fix compile error with UTF8 unicode wxWidgets build
Fixes https://gitlab.com/kicad/code/kicad/issues/10210
2022-01-05 19:23:30 +00:00
Marek Roszko 5d3609b20b Nix the deprecated binary/unary base class that aren't actually needed
The std::unordered_map custom function objects here don't require inheritance from the deprecated base
2022-01-04 18:58:42 -05:00
Jeff Young cbd665db7b Remove markup_parser from headers so PEGTL doesn't leak windows.h. 2022-01-04 12:20:18 +00:00
Marek Roszko 38a25fbc4d Fix windows compile error
pegtl.hpp is dumb and leaks windows.h which then causes #define conflicts
2022-01-04 00:49:29 -05:00
Jeff Young 8e4a4306c7 Go back to using inter-character spacing from the stroke font.
Fixes https://gitlab.com/kicad/code/kicad/issues/1078
2022-01-04 00:46:08 +00:00
Jeff Young e21fa31f64 Rip out rest of macHack architecture. 2022-01-03 22:09:56 +00:00
Mike Williams 404659d275 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
2022-01-02 23:15:36 +00:00
jean-pierre charras c4af66f6d3 Fix compil issues on Windows+msys2
Probably some fixes also on other platforms
2022-01-02 18:32:39 +01:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Jeff Young e41a4d406a Cherry-pick MARKUP_PARSER from rockola/kicad-strokefont. 2022-01-02 14:57:03 +00:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Marek Roszko c91d3e3cf9 Remove some more wxPoint 2022-01-01 14:12:20 -05:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko cadc0639eb Update BASE_SCREEN to VECTOR2I 2022-01-01 11:30:33 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Ian McInerney 1fccbdbd53 Give EDA_SHAPE a virtual destructor
EDA_SHAPE can be inherited from, so a virtual destructor is needed
to ensure the destructors are called in order.
2021-12-31 00:05:02 +00:00
Ian McInerney 0e9cfd0af2 Add missing initialization values to variables
Flagged by Coverity.
2021-12-30 23:42:06 +00:00
Marek Roszko c7447f9be6 Remove UpdateUI from preferences pdf viewer option 2021-12-30 11:36:01 -05:00
Mark Roszko 44dc602d6b Yeet wxPoint/wxSize out of PLOTTER 2021-12-29 19:02:50 +00:00
Jeff Young ccb94fd1a7 APIs for passing KIFONT::FONT pointers around.
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
Jeff Young dd6cd7d184 Pull some more improvements in from rockola/kicad-strokefont.
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
2021-12-29 17:32:19 +00:00
Wayne Stambaugh cc9d074a2a Add upated UI event throttling to advanced configuration. 2021-12-28 18:17:53 -05:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Wayne Stambaugh 7b1b96c933 Fix broken tree book selection in paged dialogs.
This only affected the tree controls that only parented sub-pages.  Do
not use the dialog ctor to select the initial page.  Queuing a page
changed event to fire after the dialog is shown is the proper solution.
2021-12-28 09:43:57 -05:00
Wayne Stambaugh 14c148cb38 Expunge update UI event handler from paged dialog object.
Use the book control page changing event to update any pages prior to
them being shown.  When the validation fails when changing pages, the
page change is vetoed until the invalid condition is fixed by the user.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5049

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10139
2021-12-27 18:40:12 -05:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young 19c3481148 Fix test failure. 2021-12-25 15:34:50 +00:00
Jeff Young acfce8d4db Fix test failures. 2021-12-24 21:33:12 +00:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young dabc75bee8 Source 3D dimensions from board stackup.
Also includes a performance improvemnt by caching the 3D model matrices.
2021-12-24 21:10:28 +00:00
Jeff Young 29c942816e Reduce duplication of settings. 2021-12-24 21:10:28 +00:00
Jeff Young b4c5e64db2 Exclusions for Unconnected Items; Markers & exclusions for Parity checks
Fixes https://gitlab.com/kicad/code/kicad/issues/5589

Fixes https://gitlab.com/kicad/code/kicad/issues/5504
2021-12-24 21:10:28 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young 6cec58cf75 Add field access to custom DRC rules.
ADDED getField() method to custom DRC rules.
2021-12-24 18:13:00 +00:00
Jeff Young c6d4a9f0b2 Button bar for PCBNew Text Properties dialog. 2021-12-24 17:39:00 +00:00
Jeff Young 23194dbe54 User-settable high-contrast dimming factor.
ADDED user-settable high-contrast dimming factor.

Fixes https://gitlab.com/kicad/code/kicad/issues/6922
2021-12-24 17:38:55 +00:00
Jeff Young af13533b42 Add show/hide controls for ERC markers.
ADDED show/hide controls for ERC warnings, ERC errors and ERC exclusions.

Fixes https://gitlab.com/kicad/code/kicad/issues/7270
2021-12-24 17:38:50 +00:00
Jeff Young a6dd1bf09b Implement Reset to Defaults for all preferences panels. 2021-12-24 17:38:39 +00:00
Jeff Young 6c05e5d1a8 Implement user viewports.
ADDED popup to Appearances palette where users can define viewports
for later selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/2271
2021-12-24 17:11:14 +00:00
Jeff Young 58d4ac2a97 Keep netnames on tracks within the viewport when possible.
Fixes https://gitlab.com/kicad/code/kicad/issues/2032
2021-12-24 17:11:01 +00:00
Jeff Young 9de62d1dd4 Promote to cell selection for spreadsheet-style paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/9211
2021-12-24 16:29:23 +00:00
Jeff Young 889970a449 SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
2021-12-24 16:13:27 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young 024097dfef Another stab at fixing the test. 2021-12-24 15:42:22 +00:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Wayne Stambaugh 4789440fe1 Fix Linux build issue. 2021-12-24 08:51:51 -05:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jeff Young ef10b36948 Add mask-to-copper clearance parameter and rename mask margin. 2021-12-24 12:36:41 +00:00
Jeff Young 4b6f2f0658 Add mechanical copper clearance testing for shapes.
Also includes going from distance-based neighbor exclusion to angle-
based.  (Distance doesn't work when very short segments are followed
by very long ones.)

Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:10 +00:00
Jeff Young 66a6a6d448 Attempt to fix test case, and improve debugging output. 2021-12-24 11:38:09 +00:00
Jeff Young a48867ea01 Solder mask integrity testing.
ADDED DRC test for solder mask aperture bridging copper from different
nets.
ADDED visualization of minimum web width processing for solder masks.
ADDED allow_soldermask_bridges property for footprints.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1792
2021-12-23 22:31:14 +00:00
Jeff Young 533276e6b6 Copper sliver checking.
ADDED DRCE_COPPER_SLIVER DRC error.
ADDED ADVANCED_CFG DRCSliverWidthTolerance and DRCSliverAngleTolerance.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:31:05 +00:00
Jeff Young a1e3f2b188 Starved thermals DRC checking.
ADDED min_resolved_spokes constraint.
ADDED "Thermal relief connection to zone incomplete" violation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:30:42 +00:00
Jeff Young 295a6408c3 User-configureable dash styles (and dash-dot-dot).
ADDED: Schematic Setup properties for dash length and gap length.
ADDED: dash-dot-dot line style

Fixes https://gitlab.com/kicad/code/kicad/issues/2206
2021-12-23 20:36:24 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young 2001d08186 Add DRC tests for text height and text thickness.
Fixes https://gitlab.com/kicad/code/kicad/issues/8683
2021-12-23 19:18:45 +00:00
Jeff Young 6e2460ad37 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020
2021-12-23 16:54:03 +00:00
Jeff Young a1c8e36c99 Scale markers somewhat proportionally to zoom.
Fixes https://gitlab.com/kicad/code/kicad/issues/10048
2021-12-23 16:54:03 +00:00
Mike Williams 956ac871c3 PCB Editor: changes to track width overrides starting track width
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00:00
Seth Hillbrand 232b39a321 Add legacy CTOR for PROF_COUNTER 2021-12-15 12:52:08 -08:00
Jeff Young 724182abe4 Fix lib tree searches to handle searching on library names.
Fixes https://gitlab.com/kicad/code/kicad/issues/9981
2021-12-14 15:18:48 +00:00
Seth Hillbrand 78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
dsa-t 4ccfc21324 Fix event id intersections when toggling some columns via popup.
Also increases maximum show/hide column count to 50.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9765
2021-12-13 00:35:44 +03:00
Jon Evans 3cb7ca1db4 Remove manual canvas scale from GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9912
2021-12-09 18:36:44 -05:00
Seth Hillbrand 9884f40952 Update call signature for SwitchLayer
We don't use DC anymore
2021-12-09 10:14:11 -08:00
Jeff Young 1f9e75f676 Pad with hole same size or larger than pad isn't flashed.
... even if it's marked as being on copper layers.

Also changes the default hole clearance to 0.25mm.

Fixes https://gitlab.com/kicad/code/kicad/issues/9901
2021-12-08 23:16:33 +00:00
Jeff Young 7ffd43a6f4 Regularize the promotion of pads to footprints in non-free-pad mode.
Also regularizes some of the other selection filtering options.

This also fixes an invalidated iterator (and subsequent segfault) in
the old code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9896
2021-12-08 13:08:54 +00:00
dsa-t 51eac3ba04 Improve EDIT_LINE position calculations beyond INT_MIN/2 ~ INT_MAX/2 2021-12-07 21:24:09 +00:00
Jeff Young 2e342ed8c9 Draw dangling symbols on a separate layer.
This allows us to draw them in front of wires, pins, and most
importantly, junction dots.

Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-06 18:50:50 +00:00
Mikolaj Wielgus b9e66d8b98 Update EDA_ITEM::HitTest docstring
HitTest() doesn't check for containment or intersection with the
bounding box, but with the selection-active region.
2021-12-06 01:16:17 +01:00
Jon Evans 014bad7b28 Add profile counters for PCB mouse and paint events 2021-12-05 15:16:08 -05:00
Jon Evans a205595404 PROF_COUNTER -> PROF_TIMER
I want to add an event counter, and this one is a timer
2021-12-05 14:25:37 -05:00
jean-pierre charras f24bdf4067 Fix minor Coverity warnings (not initialized vars). 2021-12-03 17:55:21 +01:00
Mikolaj Wielgus 9efbeaa064 Dark theme support for SPICE model editor 2021-12-03 03:41:32 +01:00
Franck Bourdonnec d877f04198 fixe paths 2021-12-02 20:23:00 +00:00
Jeff Young 8fab8a05d6 Fix shadow variable defn. 2021-12-02 11:40:31 +00:00
Mikolaj Wielgus 098f234311 Add missing types to IsInstantiableType() switch 2021-12-01 00:47:22 +01:00
Tomasz Wlostowski 2c6e9778a1 GAL: OpenGL draw calls pooling/splitting
Improves rendering performance, esp. for large designs by:
- using a separate glDrawArrays calls() for large buffers of contiguous vertices (e.g. large zone fills)
- pooling smaller items into a small-sized index buffer held in system RAM (has to be DMAed to the GPU by the driver anyway)
2021-11-29 23:30:10 +01:00
Tomasz Wlostowski 569c39ac37 GAL: runtime profiling for CACHED_CONTAINER 2021-11-29 23:30:10 +01:00
Tomasz Wlostowski ee8b2113a8 TRACE_MANAGER: very simple run-time tracing infrastructure 2021-11-29 23:30:10 +01:00
Tomasz Wlostowski 2f8ad08739 PROF_COUNTER: added string formatter method 2021-11-29 23:30:10 +01:00
Tomasz Wlostowski b59ee13fcc GAL: made Begin/EndDrawing calls public to have more control over timing of rendering context creation/destruction 2021-11-29 23:30:10 +01:00
Mikolaj Wielgus 84dd515b6a s/Instatiable/Instantiable/, s/Instatiate/Instantiate/ 2021-11-29 21:20:57 +01:00
Mikolaj Wielgus db41769bb9 Subclasses of dimensions are instatiable 2021-11-29 04:44:11 +01:00
Mikolaj Wielgus 281f8ccc4b Correct instatiable type condition 2021-11-29 04:41:25 +01:00
Mikolaj Wielgus c159bd79f0 LOCATE_ANY_T is not an instatiable type 2021-11-27 19:42:11 +01:00
Mikolaj Wielgus 55ddc8161f Add determination to which Kicad app type belongs 2021-11-27 19:42:10 +01:00
Jeff Young 9547c72e73 Teach router about different keepout rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/9786
2021-11-27 00:55:04 +00:00
Jon Evans 8026863d4c Use progress reporting in more places when loading a board
Prevents application-not-responding events while opening large designs
2021-11-25 11:19:03 -05:00
Jeff Young 5863bc0937 Put Repair Schematic behind Advanced Config. 2021-11-25 12:56:46 +00:00
PJM f3b3d18319 Removed dead code from view_controls.h
CHANGED: Removed "ForcedCursorPosition()" and "IsCursorPositionForced()"
from view_controls.h.  First, these functions are completely redundant
as they do the exact same thing but have different names.  Second,
neither is called anywhere in the entire KiCad code base.
2021-11-25 12:55:18 +00:00
Jeff Young 228edd4121 Don't generate duplicate IDs in line/wire/bus tool.
Also cleans up existing duplicate IDs when reading.

Fixes https://gitlab.com/kicad/code/kicad/issues/9749
2021-11-24 13:20:44 +00:00
Seth Hillbrand f97c7c78c8 Connect ruler tool with axes preferences
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them

Fixes https://gitlab.com/kicad/code/kicad/issues/9737
2021-11-23 12:52:21 -08:00
Jon Evans 1e8284bc1a Add ability to seed the KIID generator
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9689
2021-11-20 14:19:29 -05:00
Seth Hillbrand 766a09c338 Remove autocomplete when we lose focus
Prevents the excess dropdown from persisting over windows

Fixes https://gitlab.com/kicad/code/kicad/issues/9651
2021-11-19 17:24:16 -08:00
Jeff Young c01649fc6e Make it easier to open legacy files. 2021-11-19 13:36:14 +00:00
Jeff Young 4e6a201881 Correct cursor for search control buttons. 2021-11-18 18:25:14 +00:00
Jeff Young 1bb750814d Cleanup dead code. 2021-11-17 12:49:53 +00:00
Jon Evans 9238b27f63 Silence IsWritable warning message
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9656
2021-11-16 21:02:32 -05:00
Jeff Young 7760d3275d Fix printing of LIB_SHAPE arcs. 2021-11-17 01:39:16 +00:00
Seth Hillbrand f950d96324 Prevent dereferencing frame on exit
Processing a menu event for quitting results in the frame being
destroyed.  This crashes the program when it tries to access the newly
freed frame to check for autosave data.  We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss

Fixes https://gitlab.com/kicad/code/kicad/issues/8638
2021-11-15 10:07:28 -08:00
Jon Evans ae24daa033 Do not include text when computing drag origin for a group
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9630
2021-11-14 11:54:04 -05:00
Jeff Young 66d9e7073f More discrete borders for Kicad mgr, PCM and appearances panels.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 15:01:44 +00:00
Jeff Young 36fd62ccdc Another round of beautification changes for PCM.
Fixes https://gitlab.com/kicad/code/kicad/issues/9616
2021-11-14 13:11:19 +00:00
Wayne Stambaugh 53f5d616aa Coverity issue fixes. 2021-11-13 11:38:31 -05:00
Wayne Stambaugh f4b97eca63 Fix broken search stack behavior.
The overload of wxFilePath::FindValidPath() broke the normal behavior
when the file searched for existed in the current working directory.
This was causing the initial library table file to be copied from the
current working directory instead of from the list of search paths.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9599
2021-11-13 07:52:25 -05:00
jean-pierre charras bfd09a4d16 Avoid calling deprecated wxPlatformInfo::GetArchName() in more than one place. 2021-11-13 09:52:08 +01:00
Mikolaj Wielgus 921105330a Remove printing files from Project Manager 2021-11-12 20:18:32 +00:00
Jeff Young 0b48876ce5 Decouple left and right pane minimums for splitter window. 2021-11-12 02:12:44 +00:00
Jon Evans 16a34e6adb Use heap instead of stack for CopyStreamData 2021-11-10 22:05:44 -05:00
Jon Evans 42eb063697 PCM: Treat color themes as read-only; don't copy to settings dir
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9548
2021-11-09 22:11:59 -05:00
Jeff Young d4e3e67b8d Update kicad_prl file when doing a SaveAs.
Fixes https://gitlab.com/kicad/code/kicad/issues/9455
2021-11-09 17:25:18 +00:00
Jon Evans 75d75799f7 Move to getters/setters for aux and grid origin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8836
2021-11-08 22:36:40 -05:00
Seth Hillbrand 8f1dec61d2 Add swedish as option for translators
There appears to be activity in Weblate updating this language.
2021-11-08 11:41:14 -08:00
Mikolaj Wielgus 6d9456ea4d Fix opening files with spaces on Linux
`wxLaunchDefaultApplication()` fails on files with spaces on Unix
systems due to a programmer error. This is fixed in newer wxWidgets
versions, so let's backport it as a workaround.
2021-11-07 14:31:14 +00:00
Seth Hillbrand a153951be4 Don't set adaptive swapping over SSH
Remote connection GL drivers lie.  Don't trust them to support any
swapping other than their default

Fixes https://gitlab.com/kicad/code/kicad/issues/9532
2021-11-05 09:06:22 -07:00
Jeff Young b73793f9ef Rewrite text find/change routines to support word matching.
The old algorithm treated the "Words" checkbox as meaning match the
entire text, not match words, which is unlikely to be what anyone is
expecting.

Also fixes replace to replace all instances in a single text item
rather than just the first.

Reported on the forum.
2021-11-05 13:37:37 +00:00
Jeff Young 40b4052ad4 Improve text hittesting in schematics.
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting.  This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".

Fixes https://gitlab.com/kicad/code/kicad/issues/9506
2021-11-01 21:13:12 +00:00
Jeff Young e3ef101ec9 Add missing view controls for FP Editor Appearance Manager. 2021-10-31 16:33:03 +00:00
Jeff Young c8a8efa67b Save as for current version project files.
Fixes https://gitlab.com/kicad/code/kicad/issues/9455
2021-10-30 23:01:53 +01:00
Jeff Young 5f8e0ef1e0 Patch up arc hit-testing and printing for 6.0
This could use another look when we're not so near release.  We
really shouldn't need to special case eeWinding vs. not eeWinding.

Fixes https://gitlab.com/kicad/code/kicad/issues/9491
2021-10-30 15:10:07 +01:00
Tomasz Wlostowski 1051f11683 libeval_compiler: thou shalt not return pointers to std::vector members! (fixes an use-after-free crash in complex rule evaluation invoked by the router)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9451
2021-10-29 16:48:36 +02:00
Wayne Stambaugh e1846c33d9 Coverity issue fix. 2021-10-29 10:43:40 -04:00
Wayne Stambaugh 1f7fd436a2 Move board object polygon code into the object source files.
Having the board object polygon code all defined in a separate file made
finding the polygon code for an object difficult to find.
2021-10-25 17:42:11 -04:00
Roberto Fernandez Bautista a79a221257 Array creator tool: Add option to assign unique reference designators
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]

CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354
2021-10-25 22:38:49 +01:00
Jeff Young c52cb229d0 Add unsaved-changes indication to Symbol Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/9443
2021-10-25 12:35:04 +01:00
Jeff Young c9d858eaf5 Add status bar message for constraint mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/9282
2021-10-24 14:04:12 +01:00
Jeff Young fecb53b64f Clean up removal of separate front & back footprint text visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/9441
2021-10-22 21:14:15 +01:00
Seth Hillbrand 64bcaaefd1 Fix radiobox order for FILL_T
Fixes https://gitlab.com/kicad/code/kicad/issues/9412
2021-10-17 17:01:21 -07:00
Ian McInerney 5817a8b5f4 Remove unused m_host variable
This variable isn't needed anymore after 5f53019290
pushed dark mode handling into the HTML window itself.
2021-10-18 00:29:40 +01:00
Roberto Fernandez Bautista 99442350a4 CADSTAR PCB: Fix loading of arc tracks following recent PCB_ARC changes
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.

Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
2021-10-17 17:57:51 +01:00
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 2021-10-15 12:45:43 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young 8b08c9e53f Shorter names before things get out of hand.
Also, remove comments indicating CURVE is a Bezier.  Just call it a
BEZIER.
2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
Wayne Stambaugh c4d0a06701 Eeschema: fix broken auto save feature.
Make auto save recover all auto saved sheet files not just the root sheet.

This does not fix existing auto save issues because recovery would require
an iterative reload for each automatically saved sheet file and would only
happen once.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9288
2021-10-13 14:51:00 -04:00
Mikolaj Wielgus 5f53019290 Substitute all wxHtmlWindow with HTML_WINDOW
Remove other places where <body> tag is used to override the default
black-on-white theme.
2021-10-12 07:07:15 +00:00
Seth Hillbrand 8dbe60b0d5 Catch possible out_of_range 2021-10-11 10:33:50 -07:00
Ian McInerney 961c127ebe Convert mouse coordinates to native pixesl in the 3D viewer
All operations in the camera are done using the native pixel sizes,
so we need to ensure the mouse coordinates are converted to native
pixels to make the mouse operations line up with the view.

Fixes https://gitlab.com/kicad/code/kicad/issues/2561
Fixes https://gitlab.com/kicad/code/kicad/issues/8410
2021-10-10 17:52:12 +01:00
Seth Hillbrand 41e7284fdc Speed up pcbnew loading/updating
Rather than detaching and re-attaching the layer panels with the
attendant overhead, we keep each panel intact and only update its
contents.  Since the bindings are the same, this saves substantial time
on pcb loading as well as when closing the board setup dialog
2021-10-09 13:38:35 -07:00
Ian McInerney c14bdf7fe0 pcb_calculator: Update panel images/text when system theme changes 2021-10-08 17:31:21 +01:00
Mikolaj Wielgus faad5ee1ce Use system text and background colors in PCB calculator
wxHtmlWindow forces white background and black text. Force it back to
system settings.
2021-10-07 19:09:42 +00:00
Mike Williams 27765cd584 TOOL_DISPATCHER: drag activation should always use screen coordinates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9325
2021-10-06 19:05:18 +00:00
Jeff Young 1bb5fc3fd6 Work around EnsureVisible bug in wxWidgets during DRC cross-probe.
Also adds double-click-marker to open DRC dialog and select marker
in list.

Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-06 11:17:03 +01:00
Jeff Young 95f841a037 A more nuanced method of making Board & Schematic Setup read-only.
This one still allows you to scroll to see all contents.

Fixes https://gitlab.com/kicad/code/kicad/issues/9302
2021-10-06 11:16:46 +01:00
Seth Hillbrand 9a8d1246cc We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Jeff Young 930c4e5582 Cleanup.
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00
Jeff Young 11c91c7179 Improve obscuring dialog algorithm to handle multiple dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8970
2021-10-03 13:27:46 +01:00
Jeff Young 574bef2237 Normalize drawing sheet path to env vars & prj, not just prj.
Also cleans up the dialog a bit.

Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.

Fixes https://gitlab.com/kicad/code/kicad/issues/9036
2021-10-02 23:39:45 +01:00
Jeff Young 0dce303c49 Prefer wxASSERT to assert.
The former gives warning when not running under a debugger; the latter
does not.
2021-10-02 23:39:45 +01:00
Jeff Young e2baacec21 Add cross-probing between PCB (markers) and DRC marker list.
Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-02 23:39:45 +01:00
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Seth Hillbrand c4fcff46ab Add Thai language option 2021-09-30 08:38:41 -07:00
Jon Evans 62ef27e372 Remove hard-coded anchor color in eeschema 2021-09-28 20:26:47 -04:00
Mikolaj Wielgus adafb15126 Remove LaunchURL()
Unused and insecure.

Related to https://gitlab.com/kicad/code/kicad/-/issues/9236
2021-09-28 22:39:18 +02:00
Mike Williams 9ca836d1ea Tools: Respect system drag
Also remove the time-based aspect. We aren't all super speed clickers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8765
2021-09-27 16:44:32 +00:00
Jeff Young c05e4376f9 Update backups folder name when doing project save as.
Fixes https://gitlab.com/kicad/code/kicad/issues/9254
2021-09-27 13:24:45 +01:00
Jeff Young 544fa939f8 Lock/unlock group members when locking/unlocking group.
Also moves the stateful selection filter to after the hierarchy filter
since the hierarchy filter might swap a pad selection for a footprint
selection.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7542
2021-09-27 11:29:52 +01:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00
Jeff Young 5bf042fcc1 Use individual parameter version of wxExecute.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-26 15:03:06 +01:00
Jeff Young 46949abe4a Don't scroll to highlight an object already visible. 2021-09-25 15:31:52 +01:00
Seth Hillbrand c3b6939ea7 Allow quiet creation (scripting) 2021-09-24 13:49:45 -07:00
Seth Hillbrand 64be61b4d6 Allow user to set footprint type up front
The default is usually wrong and presenting the basic footprint
information when creating an empty footprint allows the user to
establish their preference before mistakes occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/9215
2021-09-24 13:48:01 -07:00
Jeff Young c7f098ab25 Remove unused variable. 2021-09-24 16:03:13 +01:00
Seth Hillbrand 0f10748226 Disallow Ctrl-Tab and Ctrl-Shift-Tab as hotkeys
Fixes https://gitlab.com/kicad/code/kicad/issues/9010
2021-09-20 11:13:50 -07:00
Jeff Young 3651d7c5e7 Remove vestiges of old zoom-auto architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/9055
2021-09-19 18:32:15 +01:00
Jeff Young 6e7ce09572 Use more descriptive terminology for preferred text editor.
Also improves execution to allow the preferred editor to include
parameters, such as "/usr/bin/open -e".

Fixes https://gitlab.com/kicad/code/kicad/issues/9131
2021-09-19 15:17:26 +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 364ecc02ee Hide scaling hacks on platforms that don't need them.
Fixes https://gitlab.com/kicad/code/kicad/issues/9171
2021-09-17 12:37:53 +01: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 6197717251 Avoid poor choices for point colors.
Also adjusts the point size to account for the fact that it now has a border.
2021-09-16 14:17:52 +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 7a993c0211 Add support mode for dark mode to SCINTILLA_TRICKS.
Also removes the return value from the BITMAP_STORE's themeChanged
method as it will provide the wrong answer for the second frame it's
called on.

Also hooked up ACTION_TOOLBAR, the app launcher, and the project tree
to the wx event for system color changes so they change on the fly.

Fixes https://gitlab.com/kicad/code/kicad/issues/6026
2021-09-14 00:18:50 +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 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 769ca2d255 Add a quantized scaling mode for bitmaps.
125% scaled bitmaps look bad in the Launcher so we pin to 100%,
200%, 300%, etc.
2021-09-11 23:40:31 +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
Seth Hillbrand abfc60acfc Split European Spanish and Latin American Spanish
This is a test split per requests.  While "Latin American Spanish" is
not really homogeneous, there are distinct differences to European
spanish, so we are splitting in an effort to allow both translations.
If one is less viable, this may re-merge in the future.
2021-09-10 12:45:59 -07: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 dc574bcb24 Split Portuguese
Split the dialects of Portuguese into Bazilian Portgugese and Portugal
Portuguese
2021-09-09 11:18:32 -07: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
Jeff Young e7debc495b WIP 2021-09-08 20:17:59 +01:00
Wayne Stambaugh ad1ee958b0 Code cleaning. 2021-09-07 15:18:42 -04: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
jean-pierre charras 56374ffa26 Try to fix a compil issue that does not happen on my computers. 2021-09-06 18:36:27 +02: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
Marek Roszko 525099ea06 Use the correct define for windows 2021-09-05 22:22:27 -04:00
Marek Roszko 0ee79834bb Make alt key slightly better on windows 2021-09-05 22:17:08 -04: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 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
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 a5e11111a4 Link updating of hex value and opacity slider. 2021-08-31 21:24:20 +01:00
Jeff Young e58671e2da Move color picker from CSS to HTML format for colors.
This is an attempt to remove the decimal separator from the equation,
which appears to be causing trouble on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/9043
2021-08-31 18:56:38 +01: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
Mike Williams 30987cebfe Gerbview: fix cairo negative items and implement real differential mode
Layers with negative objects need to be drawn in a subsurface before
copying so they don't _CLEAR the draw items below them when a negative
object is drawn.

Differential layers are basically the same thing only they use a
different copying operation onto the layers below.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1863
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4495
2021-08-31 12:43:53 +00:00
jean-pierre charras f59e66a897 Do not include kicad_curl.h (and therefore curl.h) in kicad_curl_easy.h
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
2021-08-28 15:31:45 +02: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
jean-pierre charras a9829a598e Plugin and Content Manager: fix compil warnings and issues.
- some are Windows (msys2 ?) specific, related to curl.
- some others are shadowed or unused vars.
2021-08-28 10:57:45 +02:00
qu1ck 0f7c0e3872 PCM implementation 2021-08-27 21:11:47 +00:00
qu1ck 4be115ca55 Add KICAD6_3RD_PARTY env variable 2021-08-27 21:11:47 +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
jean-pierre charras 4ac2aa675a lib symbols: make fp filter tolerant to spaces in names.
For historical reasons they are stored in a string using spaces as separators.
So each fp filter is now escaped to remove spaces (replaced by {space})
Fixes #9009
https://gitlab.com/kicad/code/kicad/issues/9009
2021-08-23 18:01:31 +02:00
Seth Hillbrand a3441a969d Return new string to avoid losing the reference
NETCLASSes are stored as shared pointers.  We lose the reference as soon
as the pointer count decrements to 0, which can happen immediately when
the shared pointer is returned.
2021-08-22 16:56:41 -07:00
Johan Grip b984777b52 Add more items to 3D viewer toolbar 2021-08-21 17:06:42 +00:00
Jeff Young 048e13f423 Defer DRC rule function eval to make use of short-circuit bools.
The lemon parser doesn't lend itself to short-circuiting booleans,
but if we defer processing until we fetch the second value when
processing the TR_OP_BOOLEAN opcode then we get to piggy-back on
C++'s boolean short-circuiting.
2021-08-21 16:43:11 +01:00
Jon Evans c80efb0f98 Fix save/load of appearance panel width on show/hide
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8982
2021-08-19 21:15:14 -04:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh 6427197962 Remove duplicate headers in plot and associated code. 2021-08-17 15:41:25 -04:00
jean-pierre charras 60c65c2a1d Avoid loading python stuff when starting applications that do not use it.
It is useless, and debug is slightly easier (less constraints) at least on msys2
2021-08-17 19:48:55 +02:00
Wayne Stambaugh b14b8b5fb1 Move headers from common folders to the appropriate include folders. 2021-08-17 12:40:31 -04:00
Jeff Young 8b5f393804 DRC bug fixes and debugging improvements.
1) Don't wait for UpdateUserInterface to build the (global) list of
layer names.

2) Report clearance resolution between a silk layer and a mask layer.

3) When writing DRC reports, include info about the violating rule.

4) Report "no relevant layers" if we fail to find anything to write
a clearance resolution report about.

Fixes https://gitlab.com/kicad/code/kicad/issues/8963
2021-08-17 15:41:12 +01:00
Wayne Stambaugh 8e1015fcc4 Remove all wxWidgets build dependencies from REPORTER object header. 2021-08-16 07:49:39 -04:00
Jeff Young 1a252b4f96 Add a compile error for ill-defined rules, and more performance.
Also adds const-safety to GetBoard().
2021-08-16 12:14:17 +01:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
Jeff Young bff247b08a Hook up 3D viewer colors to board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5173
2021-08-14 14:00:17 +01:00
Jeff Young ed38028eaf Fully resolve path list for Kicad2Step.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-08-14 11:21:25 +01:00
Alexander Guy 59ad333650 Check that the OpenGL drawable supports negative frame swap intervals 2021-08-13 21:11:41 +00:00
Jeff Young c536a4c4f2 Work around annoying wxWidgets assert. 2021-08-10 16:51:30 +01:00
Jeff Young a10f2b284c Unify negative zero and percent handling in UNIT_BINDER.
Some values, such as solder mask margins, are usually negative and it
helps to display zero as "-0.0".
2021-08-06 18:16:38 +01:00
Roberto Fernandez Bautista 3747cb50c9 wxCHECK_MSG instead of assert 2021-08-05 17:45:12 +01:00
Roberto Fernandez Bautista dd65ce9523 Simplify & move new arc collision code into Kimath library
Don't need to check intersections with the circle, just fix the
calculated "projected" point from the end points.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8234
2021-08-05 17:45:12 +01:00
Jeff Young d6443d5a2c Reduce type-casting a bit. 2021-08-04 17:11:35 +01:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young 78fd268b18 Retire PARAM_OBSOLETE in favour of a schema migration. 2021-08-02 17:38:15 +01:00
Jeff Young 7d501e8a43 Add PARAM_OBSOLETE to clean out old JSON structures.
While not technically necessary, the old structures can be confusing
to users looking at the files.

Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-08-02 12:53:57 +01:00
Jeff Young 4876e1b327 Make sure user.json file gets created if it didn't already exist.
Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-08-02 02:48:23 +01:00
Jeff Young c51b1dad72 Generalize infobar MESSAGE_TYPE handling and use for DRC errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/8782
2021-08-01 21:51:39 +01:00
Jeff Young e636fb32cf Fix typo initializing buswidth with linewidth value.
Also reduces line-wrapping a bit.

I don't think this fixes the linked bug, but I can't reproduce it
and this was found while reviewing the code.

Fixes https://gitlab.com/kicad/code/kicad/issues/8810
2021-08-01 19:33:19 +01:00
Jeff Young f024bf2289 Don't restrict page sizes unnecessarily.
Also don't validate custom sizes unless they are enabled.

Fixes https://gitlab.com/kicad/code/kicad/issues/8880
2021-07-29 16:47:45 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
Jeff Young 6d4c454e8c Fix some more missing escaping for symbol ids.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 18:37:09 +01:00
Ian McInerney 36d66085f5 Add a column showing 3D model file loading errors
This adds an icon to the left of the row with an error symbol if the
file can't be found or opened, and shows a tooltip over the icon with
and error string.

Fixes https://gitlab.com/kicad/code/kicad/issues/3815
2021-07-28 16:42:22 +01:00
Jeff Young 29b23df7a1 Save both front and back soldermask colour preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-07-27 22:26:13 +01:00
Jeff Young dd5676f4bc Implement a safer (RAII) tool re-entrancy guard.
Fixes https://gitlab.com/kicad/code/kicad/issues/8873
2021-07-27 16:37:34 +01:00
Jeff Young 886dc2f43e Do-not-show-again section for common prefs & zone fill warning infobar.
Note that the dialogs which have mutliple options were not moved over
as it seems perahps not the right choice to have them save state between
sessions.

Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-27 15:15:49 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 8fd83cbb95 Pass wxPoint objects by reference instead of on the stack. 2021-07-26 15:35:33 -04:00
Jeff Young e62969d007 Move zone fracture display mode to AdvancedCfg, and add triangulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-26 18:57:35 +01:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Marek Roszko 8921eef0be Add a "Open Demos Project" shortcut to the kicad launcher
Small UX improvement for the new user....
2021-07-25 21:58:57 -04:00
Mike Williams 7ba08962ba Eeschema/Common: convert mils to IU using doubles
The .kicad_pro file can contain fractional mils, and users working in
millimeters would also see weird rounding issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7865
2021-07-25 21:58:33 +00:00
jean-pierre charras 1aadf45947 DIALOG_SHIM: fix not working initial size when creating a dialog.
The first time a DIALOG_SHIM was created, with a given size, this size
was not taken in account. This this is now forced.
(when recreated during a session, this is the last dialog size that is used)
2021-07-24 18:59:28 +02:00
Jeff Young 3c1af1af74 Update selected tool string when language changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8813
2021-07-23 20:16:53 +01:00
Jeff Young a16b85db67 Read/write group locked state. Show locked state in dialog & statusbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8796
2021-07-22 12:49:30 +01:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
jean-pierre charras 56412cc843 PCB_TEXT: remove "hide" option, because they are never hidden.
- avoid write "hide" option in file
- always return true when calling IsVisible()
Fixes #8806
https://gitlab.com/kicad/code/kicad/issues/8806
2021-07-18 14:58:21 +02:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Pradeepa Senanayake 6cde086ef9 Double click on defined colour executes OK action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8778
2021-07-14 23:26:40 +00:00
Jon Evans ae55db77c5 Allow hiding version from manager title bar with advanced config 2021-07-14 18:24:21 -04:00
Wayne Stambaugh 01515680b3 Code cleaning. 2021-07-14 15:47:32 -04:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
jean-pierre charras fb246403d2 PROGRESS_REPORTER: avoid clipping the bottom of the dialog in some cases.
It occurred on Windows, when the message to display is too long and was
displayed using 2 lines.
Now the dialog is resize after changing the message.
Fixes #7953
https://gitlab.com/kicad/code/kicad/issues/7953
2021-07-11 17:52:54 +02:00
Marek Roszko 9162013132 Add advanced cfg to force reloading memory cached 3d models 2021-07-11 00:35:38 -04:00
Marek Roszko 7cb0f8f808 Add ADVANCED_CFG to always reload cached 3d models in memory 2021-07-11 00:31:06 -04:00
Marek Roszko 79b90813ec Add ADVANCED_CFG to skip caching 3d models to file 2021-07-11 00:00:06 -04:00