Commit Graph

5081 Commits

Author SHA1 Message Date
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