Commit Graph

6501 Commits

Author SHA1 Message Date
david-beinder c692b04eb9 Improve native language names
Use the most common form, same as Wikipedia
2021-05-26 07:03:42 +00:00
Seth Hillbrand 2131a44889 Correct Finnish language name
Fixes https://gitlab.com/kicad/code/kicad/issues/8464
2021-05-21 13:29:40 -07:00
Jeff Young 4a77a4080d Fix Coverity warning. 2021-05-21 14:38:15 +01:00
Jeff Young e93e9fa3e5 Add rudimentary type checking to rule eval with reporter.
Also cleaned up existing error reporting to not expend CPU cycles
when there was no reporter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8438
2021-05-20 23:06:24 +01:00
Jeff Young ccaf9e11df Load footprint info when there's no cache available.
Fixes https://gitlab.com/kicad/code/kicad/issues/8371
2021-05-14 22:24:21 +01:00
jean-pierre charras 6f9dbd3548 Add missing surname to a contributor. 2021-05-12 08:18:05 +02:00
Jeff Young 12f985f978 Add Quit and Close to the HotKeys list.
Fixes https://gitlab.com/kicad/code/kicad/issues/8391
2021-05-11 23:25:13 +01:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
david-beinder 49d02560e4 In footprint filter, check pin count mismatch first 2021-05-06 22:00:06 +00:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Wayne Stambaugh d2a7f81b10 Debugging improvements and clean up.
* Remove unused wxLogDebug calls.
* Add add application level character tracing to detect unhandled key
  events.
* Catch unhandled exceptions in KiCad main event loop like single top
  applications.
2021-05-03 18:08:15 -04:00
Roberto Fernandez Bautista f2677340f2 Access the new paste behaviour via a new Paste Special... dialog
ADDED Paste Special... action in pcbnew

CHANGED Additional options for Paste Special... in eeschema, including
"Assign unique reference designators to pasted instance"
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista 0f0c5c194b Add qa test: save and reload schematic with page numbers
Note: PGM_BASE::InitPgm() is creating a SETTINGS_MANAGER object, which
in turn tries to display a "migrate settings" dialog when no settings
are found, but obviously the dialog can't be displayed inside docker.

Needed to add an optional parameter to InitPgm() in order to allow
running in headless mode.
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista ae009e0758 Ensure clipboard data is available after KiCad closes
Always Flush() after SetData()
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00
jean-pierre charras aee1593678 Fix wxWidgets alerts
Fixes #8346
https://gitlab.com/kicad/code/kicad/issues/8346
2021-05-02 16:02:33 +02:00
jean-pierre charras 6b9e44e59c pl_editor: save comment associated to DS_DATA_ITEM graphic items.
The editor has an entry to set a comment associated to a graphic item.
It is only for the designer, but the code to save it in .wks file when not empty was missing.
The code to read it exists since the beginning, so no change in file format
2021-05-02 08:59:15 +02:00
Jeff Young 16ebb3a433 Fix Mac compile error and clean up some other includes. 2021-05-01 22:25:41 +01:00
Marek Roszko 0dd746548a DS_DATA_MODEL::LoadDrawingSheet actually was meant to accept blank filenames as a good thing
It was there...if you stared at it long enough
2021-05-01 15:55:25 -04:00
Marek Roszko 6b03b26364 Actually ensure we cleanup in case of failure in dialog_page_settings 2021-05-01 14:14:57 -04:00
Marek Roszko d4bb1cbc63 Make drawing sheet loading slightly smarter 2021-05-01 14:11:31 -04:00
jean-pierre charras f6f2284851 Fix missing includes on Linux after commit 0427bda7 2021-05-01 20:05:01 +02:00
Jon Evans 5b040f16a3 Refactor environment variable storage
CHANGED: Environment variables defined outside of KiCad will no longer
         be saved in the settings file.  Paths can be configured via
         the Configure Paths dialog and those changes will be saved in
         the settings file if the new path is different from the default
         and the path variable was not defined in the system environment.
2021-05-01 13:39:43 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko cc1bfd4c18 Harden drawing sheet loading slightly...
The fact it blindly assumed it would always work makes me sad :( So this is just ducktape
2021-05-01 13:20:58 -04:00
Marek Roszko eb343d3f8f Avoid using the string type name as a variable name 2021-05-01 11:13:53 -04:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Marek Roszko ca1b98a4ab Fix type in check just added for arch 2021-04-30 19:25:57 -04:00
Marek Roszko cbad18ad98 Hide gal profiling behind KICAD_GAL_PROFILE cmake option
__WXDEBUG__ is too easy to get set
2021-04-30 19:24:36 -04:00
Marek Roszko 51fee0a3ad Add binary bitness in version info.
Fix #4425
2021-04-30 19:24:36 -04:00
Marek Roszko f083f043cb Account for taskbar being on top for determining window positions on launch
Windows doesnt need an ambiguous "screen border region" defined in percent, it's an absolute area given in pixels
Also we need to check the top corner y value to the ClientArea returned from the wxDisplay, in the situation the task bar is on top.

Fix #7850
2021-04-29 20:18:19 -04:00
Jon Evans 64d35ecebc Enable dark mode for MacOS 2021-04-28 23:24:19 -04:00
Jon Evans f00cee438f Fix running from build dir on MacOS after recent build system changes 2021-04-28 23:21:19 -04:00
Hanya 4b5cff8c5d Readd half and full width forms 2021-04-28 17:27:07 +00:00
Jeff Young ddeac126ad Dialog spacing.
On OSX GUI guidelines require "destructive" buttons to be spaced away
from other buttons.
2021-04-25 19:28:41 +01:00
Jon Evans d3194cc6db Work around wxWidgets ConvertToDisabled not being dark-mode aware
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8297
2021-04-25 13:05:23 -04:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jon Evans e7d3bf29aa Don't save project for legacy board without explicit action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7368
2021-04-21 21:27:23 -04:00
Marcus A. Romer 6fdf567b21 Redirect to website when help files are missing
In case the documentation and help files from kicad-doc are not
installed or are located in a folder where KiCad cannot find them, an
info dialog is shown offering the user the option to access the online
help system instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/2142
2021-04-21 19:19:25 +00:00
Marcus A. Romer c5e77e9739 Respect KICAD_DOCS when searching for help files
On Linux, the documentation and help files are potentially installed to
a non-standard location (i.e., outside of /usr/share/doc/kicad/). This
can be the case when, e.g., multiple versions of KiCad are installed in
parallel. Making KICAD_DOCS available at run-time is the only viable
solution to allow the applications to find the help files in this case.

Fixes https://gitlab.com/kicad/code/kicad/issues/7874
2021-04-21 19:19:25 +00:00
Marcus A. Romer a97ccbf7ed Refactor help file search logic
Rely on existing code to initialise the list of paths in which the KiCad
documentation might be located, thereby making SearchHelpFileFullPath
platform-agnostic and easier to read.
2021-04-21 19:19:25 +00:00
Jeff Young dff5e7c55e Adjust infobar error/warning times.
My last bump up in the times might have been too much.  Try to find a
middle ground.
2021-04-21 15:40:59 +01:00
Jon Evans 693413b47e Fix project saving in pcbnew standalone when project is new
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8244
2021-04-20 20:59:51 -04:00
Marek Roszko ce3a84f579 Consolidate wx aui dock art color setting 2021-04-19 21:12:02 -04:00
Jon Evans eac2700af6 Launcher: use unscaled bitmaps
This is not really a toolbar so we should not scale here
2021-04-19 17:18:17 -04:00
jean-pierre charras 1bfa3dc6a5 Fix an annoying issue (wxMSW specific) about X_VIEW_CONTROLS::CaptureCursor()
On MSW, CaptureMouse() was sometimes called event if the GAL panel has
captured the mouse (that was not accepted by wxMSW), although HasCapture()
returns false.
(Perhaps some race condition between events)
The fix add a flag to avoid calling twice CaptureMouse() after only one
wxEVT_MOUSE_CAPTURE_LOST event was received.
Fixes #8239
https://gitlab.com/kicad/code/kicad/issues/8239
2021-04-19 21:23:07 +02:00
Jonathan Haas 325ab738b5 Use a slightly less egregious hack to enforce linespacing in DRC reporter, that also works on GTK
Fixes https://gitlab.com/kicad/code/kicad/issues/7319
2021-04-18 20:18:02 +00:00
Ian McInerney ae91042544 Implement thread safety for symbol loading routines
These functions can be called from any thread of the library
loader, so we need to ensure we have some thread safety with them.
2021-04-18 18:39:46 +01:00
Jeff Young 13473420e5 Remove duplicated routine and fix bug in UTIL version. 2021-04-17 15:10:59 +01:00
Wayne Stambaugh 2ae264751f Rename class_board_stackup.{h|cpp} to board_stackup.{h|cpp}. 2021-04-16 17:07:06 -04:00
Ian McInerney 43425d7306 Add logging of the functions used in the coroutine implemntation 2021-04-16 17:49:52 +01:00
Ian McInerney e7798d8f23 Add another logging call to the tool manager 2021-04-16 17:49:52 +01:00
Ian McInerney e237b6a2af Add thread sanitizer support to Cmake 2021-04-16 17:49:52 +01:00
Ian McInerney 0bdce00c42 Be explicit we don't care about the wxID of the control 2021-04-16 17:49:52 +01:00
Jeff Young 3a6a919097 Improve clarity in the Print dialog around edge cuts layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/8200
2021-04-16 16:53:51 +01:00
Jon Evans 433e148e08 Move some string formatting functions out of base_units
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
2021-04-14 23:21:10 -04:00
Marek Roszko 43e93cc801 Force disable the native dropdown caret on grid comboctrl's we create
Fix #7212
2021-04-14 22:54:40 -04:00
Marek Roszko cb215a0abe Ensure our grid helper comboctrls generate returns as events instead of internally processing
Fix #1874
2021-04-14 21:37:21 -04:00
jean-pierre charras 7c64dba333 NUMERIC_EVALUATOR::parseSetResult(): fix incorrect use of %g to print a double.
This function is used in UNIT_BINDER, that does not accept floating notation
with exponent, that can be generated by parseSetResult().
As a result: values < 0.0001 cannot be entered in a UNIT_BINDER.
2021-04-14 19:47:03 +02:00
Jon Evans 4f191ce2c7 Squash GCC warning about boolean expression 2021-04-13 21:53:43 -04:00
Johannes Maibaum 39c1387b5b Allow to relocate EDA libraries out of KICAD_DATA
Introduce a new advanced config variable `KICAD_LIBRARY_DATA` which can
be used to move templates, symbols, footprints, and 3dmodels out of
`KICAD_DATA`. If not defined, everything is kept as before.

To facilitate this, PATHS::GetStockEDALibraryPath() is added. This
allows to differentiate code paths looking for EDA library data vs. code
paths looking for plugins, demos, and the like.

Thanks to Aimylios for the hints and suggestions with regards to the
stock EDA library data path handling on Windows and MacOS.
2021-04-14 01:51:22 +00:00
Jeff Young f7cc6d1e1e Fix save as and save copy as for project files. 2021-04-13 17:56:50 +01:00
Seth Hillbrand dec5734ff2 Add Hiroshi Tokita to translators 2021-04-12 15:19:07 -07:00
Roberto Fernandez Bautista 9148542219 CADSTAR Schematic: Fix Text Positioning within Symbols 2021-04-12 20:25:03 +01:00
Jon Evans 7784d7cb12 PNS: Fix visible area restriction
VIEW::GetBoundary() returns the entire view area, not the visible area.
Surprisingly, we had no API for this, so I added one.

Also, changed the dragger behavior to toggle between optimizing just the
modified area and optimizing the visible area, i.e. we will now never
optimize off-screen portions of the dragged track.
2021-04-10 16:13:08 -04:00
Thomas Pointhuber f13eb13b9a altium: import images from SchDoc 2021-04-10 21:52:37 +02:00
david-beinder 4c9f7c414d Add my name to contributors list, remove duplicate 2021-04-09 22:38:15 +00:00
david-beinder 6b0ff156ae Allow creating uppercase net names in net selector
Also show option to create a new net if the search string is a substring of an already existing net name
2021-04-09 22:38:15 +00:00
Jon Evans 7dd6a182f2 Unhide the Altium schematic importer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8069
2021-04-08 22:22:03 -04:00
Jon Evans 5ae54c1610 Fix Windows stock BOM plugins dir
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8147
2021-04-08 22:16:20 -04:00
Seth Hillbrand d48adf9c77 Update donate link to use in-app variant 2021-04-08 16:58:45 -07:00
Seth Hillbrand da6f9c399f Add in-app donate link 2021-04-08 16:58:45 -07:00
Jeff Young b83380b2ba Performance: don't look up map entry twice.
Fixes https://gitlab.com/kicad/code/kicad/issues/8157
2021-04-08 23:10:30 +01:00
Ian McInerney 1a727558b0 Switch update event handlers to use the event instead of pointers
It is safer to use the event to pass the enable/string
instead of pointers, since using the pointers could trigger
other UI events.
2021-04-07 17:39:48 +01:00
Roberto Fernandez Bautista 235688e459 Less restrictive Arc Track Dragging tool
Use the connecting straight tracks even if not exactly parallel - allow
an error margin configurable in ADVANCED_CFG (default 1 degree). Also
be less strict about end point matching and use the width of the track
as the criteria to determine suitability.

Finally, delete any short lengths of track at the end of the operation
and amend the arc end points to keep connectivity.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7967
2021-04-06 12:52:01 +00:00
jean-pierre charras fc04ece458 PDF plotter: fix a incorrect item in the header.
Fixes #5593
https://gitlab.com/kicad/code/kicad/issues/5593
2021-04-06 11:28:56 +02:00
Roberto Fernandez Bautista d041578150 CADSTAR Schematic: Fix import of text alignment
Ensure that the text alignment applied to text objects corresponds to
valid text alignments that can be set within eeschema

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8090
2021-04-05 20:15:08 +01:00
Roberto Fernandez Bautista 213d2fe977 CADSTAR: Parse missing NOTPICKABLE node 2021-04-05 20:15:08 +01:00
Jonathan Haas f21111fda6 Add myself to contributors, fix minor ordering problems in contributor list 2021-04-05 16:15:25 +02:00
Jonathan Haas 55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Ian McInerney e08387ce3d Make the GAL responsible for the native cursor management
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).

Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2021-04-05 02:36:12 +01:00
Carsten Schoenert 8dff3725ac Typo fix: Correct 'allow to' -> 'allows one to' 2021-04-03 13:39:50 +00:00
Jon Evans c1573744be Lock project files when opening; open locked projects read-only
Also clean up an include-what-you-use problem

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8037
2021-04-02 19:29:56 -04:00
Ian McInerney 8ea18c0639 Don't steal focus from other windows on GTK
Before, it was possible for the canvas to steal the
focus if the cursor was only moved over it and not
clicked. Now, the canvas will only take the focus if
the frame is active.

Fixes https://gitlab.com/kicad/code/kicad/issues/7233
2021-04-03 00:17:28 +01:00
Ian McInerney 1db5e2bc96 Don't force an entire refresh of toolbars to update sizes
Forcing an entire refresh of the toolbars is wasteful,
so instead just update the sizers directly.
2021-04-02 19:12:21 +01:00
Jeff Young e1a3a8338c File left out of previous commit. 2021-04-01 18:10:04 +01:00
Jeff Young a4fba7014e Give the infobar a reasonable colour on Mac. 2021-04-01 11:55:48 +01:00
Jeff Young 0c4184f1a4 Split lib tree initialization into a two-pass affair.
This is under the supposition that we can't set the column widths
on some Mac instances because the host controls haven't yet been
created.  This is primarily conjecture based on looking at things
that have the *possibility* of going wrong.  Why this only happens
in some installs is beyond me.

Fixes https://gitlab.com/kicad/code/kicad/issues/5479
2021-04-01 10:51:29 +01:00
Jeff Young 2ad69fc56b Move importers from wxLog to REPORTER.
Fixes https://gitlab.com/kicad/code/kicad/issues/6389
2021-03-31 22:54:30 +01:00
Roberto Fernandez Bautista a530c22eff Shorten "Allow free pads" tooltip and rename button "Skip Locked Items" 2021-03-31 18:28:18 +00:00
Roberto Fernandez Bautista 484cc924a8 Clarify Locked Items Query dialog
Explain better what the dialog does when each option is selected.
2021-03-31 18:28:18 +00:00
Ian McInerney 0a0935e0f3 Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
After commit 9535153f9e there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00:00
Jeff Young 676d862bee Don't allow really narrow widths for tree control.
Fixes https://gitlab.com/kicad/code/kicad/issues/5479
2021-03-30 20:59:11 +01:00
jean-pierre charras 6eb2e2a6e3 Fp editor: do not change item UUIDs when loading a footprint from library.
Fixes #8066
https://gitlab.com/kicad/code/kicad/issues/8066
2021-03-30 12:58:22 +02:00
Jon Evans 0377eea45e Do not migrate hotkeys from old versions
We don't have a migration handler that can resolve conflicts
and tell the difference between hotkey changes that KiCad made
that we want users to adapt to, and hotkey changes made by the
user.

So, the least-bad option for 6.0 is to just not migrate old
hotkey config files.

See https://gitlab.com/kicad/code/kicad/-/issues/7816
2021-03-29 18:14:24 -04:00
Jon Evans 7a4f5be37e Add back Mac special-case to GetStockPlugins3DPath
3D plugins are not like other plugins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7750
2021-03-29 17:07:37 -04:00
Wayne Stambaugh 6d2f80b4cf Pcbnew: add write board netlist to file support.
This is hidden behind an advanced configuration setting and is primarily
useful for developers trying to troubleshoot the netlist payload sent
from the board editor to the schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/8051
2021-03-28 08:38:29 -04:00
Jeff Young 8a8167ff0a Use app display name in messages to user.
Fixes https://gitlab.com/kicad/code/kicad/issues/8038
2021-03-28 13:08:27 +01:00
Jeff Young 673baa0864 Allow menu to close before putting up dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/8055
2021-03-28 13:08:27 +01:00
Ian McInerney 475ac3697f Ensure toolbar controls have the correct width on frame creation
Otherwise they could be slightly too small and then look odd.
2021-03-28 13:07:56 +01:00