Commit Graph

6886 Commits

Author SHA1 Message Date
Jeff Young 9411d301a0 Repair recent pass-by-reference cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8576
2021-06-09 10:56:53 +01:00
Marek Roszko fad5f9881a Remove abandoned variable and thus another include 2021-06-09 00:07:12 -04:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko 19faadf149 Move wx/dynlib.h include to source file 2021-06-08 21:35:02 -04:00
Seth Hillbrand ea283625a7 Further simplification of AA regime
Reduce each (Accel & Fallback) to 3 options: Off, Fast, Good.  Fast AA
in accelerated canvas uses SMAA with tweaks suggested by David Beinder.
Good AA is super-sampled x2.

Cairo is similarly reduced to Off, Fast, Good, which map to the Cairo
options themselves.  Best is removed as it mostly affects text rendering
and not line drawing (as our text is)
2021-06-08 17:20:41 -07:00
Marek Roszko 6e01ce84b9 Break out eda_item_flags.h, fix the typedef to std::uint32_t, fix some signed vars 2021-06-08 19:12:30 -04:00
Marek Roszko b2f5c989a6 Suppress leaking eda_item so much via undo_redo_container.h 2021-06-08 19:12:30 -04:00
Marek Roszko 20134e4a1b Evict some more eda_item.h includes 2021-06-08 19:12:29 -04:00
Jeff Young 2aaec31832 Don't put up "old version" warning for gerbview-generated PCBs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8574
2021-06-08 22:12:44 +01:00
Wayne Stambaugh e6346e3103 Pass objects by reference instead of on the stack part 2. 2021-06-08 13:47:21 -04:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Marek Roszko ab82b01714 Evict the last bits of wx.h 2021-06-07 20:23:27 -04:00
Jon Evans ad6256bdca Fix linux/wx3.0 build 2021-06-07 19:07:49 -04:00
Marek Roszko 0e16db0c25 Kick wx.h mostly out of common 2021-06-07 18:38:52 -04:00
Marek Roszko ca9b719af3 Add missing headers for linux post wx.h removal 2021-06-07 18:22:20 -04:00
Marek Roszko 69d7a23e1c Start cleaning out wx/wx.h in cpp files 2021-06-07 18:20:47 -04:00
Marek Roszko 8f2819cfa4 Kill the last of wx/wx.h in headers 2021-06-07 17:59:20 -04:00
Johannes Maibaum 022dd6072c Add utility method to resolve symlinks
The same logic block to resolve possible symlinks exists in 5 different
places now. This change moves this duplicated code to a static member
function of WX_FILENAME instead.
2021-06-07 20:59:59 +00:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
Wayne Stambaugh 08e8b17029 Minor plotter code improvements. 2021-06-07 14:32:27 -04:00
Seth Hillbrand 4c293e0936 Clarify AA options
Moves the OpenGL AA options to the same Fast/Balanced/HQ options as used
in Fallback.  Fast and Balanced are the SMAA options, with decreasing
threshholds and more processing in the balanced version.  HQ is
supersampling x2.  This takes more memory and may not work for HiDPI
screens with underpowered graphics cards.  But it looks the best of the
three options.

The SSx4 option is removed as it added little benefit in either regular
or HiDPI screens

Fixes https://gitlab.com/kicad/code/kicad/issues/5196
2021-06-07 09:40:15 -07:00
Seth Hillbrand 0a31e2d4fd Tweak AA settings for fast/balanced SMAA 2021-06-07 09:40:14 -07:00
jean-pierre charras 6cfc2755ed Remove a useless "#include wx/wx.h" from wx_html_report_panel.h 2021-06-07 09:26:13 +02:00
Marek Roszko 3ae4aa493f cadstar_archive_parser.h doesn't need dsnlexer.h 2021-06-06 19:34:53 -04:00
Marek Roszko 5bb6f8c5e3 hashtables.h doesn't need eda_item.h 2021-06-06 19:11:35 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Marek Roszko 527bda5d58 Split out selection.cpp to reduce header sharing
selection.h is included into 782 compilation units....
2021-06-06 11:09:07 -04:00
Marek Roszko fcb21038cb Reduce some eda_item.h usage in headers 2021-06-06 11:09:06 -04:00
Dominik Sliwa 3d45e8dccc Fix macos build 2021-06-06 14:37:39 +00:00
Marek Roszko e234e4dc8b Remove wx/log.h from vertex_manager.h 2021-06-06 09:31:00 -04:00
Marek Roszko 581ba21865 Remove wx includes out of cadstar_archive_loader.h 2021-06-06 09:28:02 -04:00
Jon Evans eaf178cd2a Fix load of nested settings 2021-06-06 08:39:02 -04:00
Jon Evans 28909c1a72 Maybe fix arch build 2021-06-05 22:10:23 -04:00
Jon Evans c9a660a80c Rework JSON integration to speed up build 2021-06-05 17:08:38 -04:00
david-beinder 86add3bb85 Fix MSVC C4312 warnings when casting 32bit ints to pointer types on 64bit builds 2021-06-05 02:57:51 +00:00
Jeff Young 5f37161c74 Tooltip for selection tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/8544
2021-06-04 23:13:14 +01:00
david-beinder 2b4564571c GAL: Tune SMAA to have a conservative and aggressive mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8522
Conservative makes SMAA usable in Eeschema through weaker AA.
Aggressive reduces some artifacts compared to the High preset.
Restores the unused Ultra preset in the shader source to its original state.
2021-06-04 17:48:34 +00:00
Michal Schulz 8da77422d0 added missing wx/scrolwin.h header. Required by wxScrolledWindow. 2021-06-04 17:46:07 +00:00
Marek Roszko 564826feae Use wxRect in dialog_shim rather than eda_rect for purely gui logic 2021-06-03 21:11:08 -04:00
Seth Hillbrand cccdaddd50 Adding SHAPE_ARC direct plotting 2021-06-03 17:12:56 -07:00
Seth Hillbrand 3d4ce0796e Add Gerber plot for SHAPE_ARC and SHAPE_LINE_CHAIN 2021-06-03 17:12:56 -07:00
Marek Roszko b1c9083743 Remove the wx/docview.h include 2021-06-03 18:42:08 -04:00
Marek Roszko 4e94b1fe86 Remove the universal sockets include 2021-06-03 17:59:46 -04:00
Seth Hillbrand 4486cdb92e Don't use wxApp-dependent functions in headless
When running headless, e.g. from Python script, the wxApp has not be
instantiated, so we cannot use wxConfig.  In this case, we fall back to
the class defaults in ADVANCED_CONFIG()
2021-06-03 12:31:45 -07:00
Ian McInerney 2de010f08b Fix ordering of class constructor init list 2021-06-03 20:04:00 +01:00
Hajo Nils Krabbenhöft 937f502158 Improve accelerated supersampling 2x antialiasing
Avoid fractional pixel offsets by forcing integer division of m_screenSize.
Shift rounded lookAtPoint onto OpenGL pixel center to ensure consistent rounding to int.
The pixel 0..1 @ 1x needs to fill the area 0..2 @ 2x so its center moves by 0.5 * (pixel size @ 1x).
2021-06-03 17:53:51 +00:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Ian McInerney 5306ba4d55 Add missing header to eda_base_frame 2021-06-03 13:45:41 +01:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Marek Roszko b5b76eedf7 Avoid sharing gdicmn for just bitmaps 2021-06-03 01:46:04 -04:00
Marek Roszko 8ea180c6b7 Don't leak wx/debug everywhere via tool_event 2021-06-03 01:36:12 -04:00
Marek Roszko 29783f125b Eliminate one wxRect constructor in BOX2
The only usage auto converted to BOX2D anyway...
2021-06-03 01:27:15 -04:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Marek Roszko af2707929d Don't leak a wx header via eda_item.h
Turns out this provided the translation header globally :D
2021-06-02 19:18:48 -04:00
Marek Roszko eeb405c196 Cleanup some more excess math/util includes 2021-06-02 00:50:46 -04:00
Jon Evans c8f308dd36 Update hotkeys dumper to use asciidoctor keyboard macro 2021-06-01 22:46:02 -04:00
Marek Roszko 45d1684bbe Move inline function declaration to allow removing include 2021-06-01 19:03:22 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Seth Hillbrand 3ca9e2d2b6 Add missing wxString* conversion
Python needs to know how to optionally convert to a wxString* for SWIG
to build out the interface.
2021-06-01 20:18:24 +00:00
Marek Roszko 6b18803221 Fix another typedef conflict 2021-06-01 20:18:24 +00:00
Seth Hillbrand c0bc6b1107 Fix compile errors on MSVC 2021-06-01 20:18:24 +00:00
Seth Hillbrand 88e4b7f7c4 Update Python Helpers 2021-06-01 20:18:24 +00:00
Seth Hillbrand bf1437899e Add Python Tool to pcbnew 2021-06-01 20:18:24 +00:00
Seth Hillbrand c7d188a8d0 Centralizing SCRIPTING class 2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Seth Hillbrand f274a00c08 Remove PYTHON_* compile options 2021-06-01 20:18:24 +00:00
Jon Evans 247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14d.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00
Jon Evans 1a102f03c0 Clean up co-linear tracks after finishing routing
This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
2021-05-31 17:36:38 -04:00
Jon Evans 793f133815 Apply shift-hotkey fix to all platforms
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1809
2021-05-31 11:44:00 -04:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Tomasz Wlostowski 2b955437b6 VIEW_OVERLAY: add Get[Fill/Stroke]Color methods. 2021-05-31 00:15:16 +02:00
Jon Evans d856b01d32 Contextual hotkeys can overlap for different tools
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8512
2021-05-30 14:12:03 -04:00
Jon Evans b7f32d7f53 Clean up some layout of pages in Board Setup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8474
2021-05-30 14:04:00 -04:00
Jeff Young 58fe89a050 Fix some issues with button alignment and order on OSX. 2021-05-29 22:10:43 +01:00
Jon Evans ae84696341 Fix shift-modified hotkeys in GTK (thanks Ian)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1809
2021-05-29 13:18:20 -04:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
jean-pierre charras 37c31196f4 Eeschema, importFile: build the HTML report messages before displaying the dialog.
Fixes #8507
https://gitlab.com/kicad/code/kicad/issues/8507
2021-05-29 10:23:11 +02:00
Seth Hillbrand ebcce9ae0a Handle directory entries in Archive Project
ZIP archives may have entries that are only directories.  We should not
try to extract this entries (they have no length); instead, we merely
create the path and continue
2021-05-28 16:24:15 -07:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Seth Hillbrand 11438eb0ec Add standard wire orange and correct color init
Initialized COLOR4D takes an EDA_COLOR_T enum but then referenced it as
an index to the color table.  This uses the enum as comparison against
the table-stored enum.

Adds standard orange to picker swatches
2021-05-28 11:51:54 -07:00
Seth Hillbrand d7f219e98f Unify IsSave and IsModify
The flags and calls were used identically, leading to potential
confusion/bugs.  Testing for modification should go through
IsContentModified()
2021-05-28 11:51:54 -07:00
Wayne Stambaugh 19607f1488 Fix file browser text button default path handling. 2021-05-27 14:19:06 -04:00
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
Ian McInerney 7bfa8575fa Remove redundant information from import/export menu item labels
Saying "Import/Export" on the labels when the submenu has "Import"
or "Export" in it is redundant.

Note that we can't just update the action text with the new name,
because that is used in the hotkey list and would become too confusing
without the "Import"/"Export" text.
2021-03-27 18:50:35 +00:00
Ian McInerney 57518fd0f9 Update the icon set + toolbars when the system color theme changes
This ensures the icons switch from dark<->light when set
to the automatic theme.
2021-03-26 15:50:56 +00:00
Ian McInerney 3146d03aaa Properly ellipsize layer names in the GerbView layer manager
Before, the layers were always ellipsized if the name was >30
characters, even if the widget was wide enough to display
the full name. Now they are ellipsized when needed (e.g. if
the widget is shrunk small enough).

Fixes https://gitlab.com/kicad/code/kicad/issues/1919
2021-03-26 15:50:56 +00:00
Ian McInerney f6041fb52d Force update of some text when activation status changes
The text areas aren't always redrawn when the window is activated
or deactivated, so we need to force a refresh of the text to ensure
it is the correct font color.
2021-03-26 15:50:56 +00:00
Ian McInerney 804c09b8f2 Use wx to draw the arrow on the collapsable pane
This allows for color changes and scaling of the arrow
when the display needs it (e.g. HiDPI displays).

Also make the arrow and text respond to if the window is
active to mimic native controls.

Fixes https://gitlab.com/kicad/code/kicad/issues/6042
2021-03-26 15:50:56 +00:00
Ian McInerney 1d81826409 Use disabled text in message panel when window isn't active
When the window is not active, the status bar uses disabled text,
so the message panel sticks out because it is then using a different
text color. This is most noticable in dark mode.
2021-03-26 15:50:56 +00:00
Jeff Young 262badf6ea Back out arrow support for lib trees. 2021-03-25 15:51:00 +00:00
Jeff Young 7593ee3917 Add right/left arrows for exapand/collapse.
Fixes https://gitlab.com/kicad/code/kicad/issues/8022
2021-03-25 12:23:18 +00:00
qu1ck 75819206a0 Add support for dark theme in plugin icons
Action plugin authors can specify alternative icon path for dark theme.
If it's not specified then standard icon will be used for both light and
dark themes. If neither icon is specified then the default puzzle piece
icon is used.

Fixes #7984
2021-03-24 21:59:30 +00:00
Jon Evans 7e8bd2e561 Need to allow recreation of socket holder
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8017
2021-03-24 17:07:34 -04:00
Ian McInerney 2da2b00560 wxPython ruins everything...
They really should just use a released version of wxWidgets
in their released versions and not some random commit from
the development tree.
2021-03-24 13:28:48 +00:00
Ian McInerney d430fae05d OSX doesn't get the latest and greatest things 2021-03-23 21:44:34 +00:00
Jon Evans df84a90f6c Turn down timeouts for socket connection 2021-03-23 17:43:24 -04:00
Ian McInerney a94a481574 Fix compile warnings
Some simple warnings and also a deprecation warning from wx
because they felt that a function should be renamed...
2021-03-23 19:46:49 +00:00
Ian McInerney 41f88dbabc Refactor platform-specific init into two phases
The first phase is for the environment before the OS
apps are created, and the second phase is for after
the OS app is created but before all of our processing.

Fixes https://gitlab.com/kicad/code/kicad/issues/7992
2021-03-23 19:11:08 +00:00
Jon Evans 41d97e0007 Fix thread cleanup issue on Windows/msys2 2021-03-23 13:39:20 -04:00
Jon Evans 9020611657 Cleanup 2021-03-22 23:42:48 -04:00
Jon Evans 4dbeb15024 Use a worker thread to send socket commands
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6503
2021-03-23 03:20:40 +00:00
Wayne Stambaugh d96cccbf20 OpenGL GAL tracing improvements. 2021-03-22 17:45:49 -04:00
Jeff Young f24f0d93a5 Make OK default in inspectors (and hook up to close window).
Fixes https://gitlab.com/kicad/code/kicad/issues/7831
2021-03-22 21:20:54 +00:00
Jon Evans e0fdfbe1d5 createThemeList takes a filename, not a name
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7075
2021-03-21 21:03:01 -04:00
Jon Evans cc8413c841 Tweak default zoom settings for Windows
Acceleration seems to be worse than constant on many
systems, so let's turn it off by default.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5434
2021-03-21 19:46:23 -04:00
Roberto Fernandez Bautista 35438d3533 Add more bounds checking in KIwxExpandEnvVars
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7461
2021-03-21 20:13:20 +00:00
Jon Evans cdb352bb24 Allow finding kicad_3dsg when running from build dir
This might also come in handy later when we use more dynamic libs
2021-03-21 09:16:47 -04:00
Jon Evans 9a13835f5d Allow running release builds from build dir also 2021-03-20 21:03:19 -04:00
Marcus A. Romer c291162567 Use KICAD_DATA to find stock libraries on Linux
Use the KICAD_DATA build-time variable to determine the default stock
library search path on Linux instead of relying on DEFAULT_INSTALL_PATH
in combination with hardcoded folder names. The search logic for Windows
and macOS is refactored but remains unchanged.
2021-03-21 00:28:33 +00:00
Marcus A. Romer e9eb5a5e21 Refactor definition of stock data path
It is not always useful to distinguish between the cases when KiCad is
run from the build or the installation directory. E.g., the libraries
are generally not available in the same path as the code. Make the
evaluation of KICAD_RUN_FROM_BUILD_DIR conditional to accomodate these
scenarios.
2021-03-21 00:28:33 +00:00
Jeff Young eb5a85ba91 Fix coding error in DoubleValueFromString. 2021-03-20 21:53:30 +00:00
Thomas Pointhuber d9229697d8 altium: special string override map should be case-insensitive
This only fixes overrides where we explicitly map an override. Wrongly written variables pointing to fields are not corrected by this.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
2021-03-20 20:42:25 +01:00
Thomas Pointhuber cd26db24f9 altium: allow text in special strings
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256#note_529783269
2021-03-20 19:25:57 +01:00
Jon Evans 6924b98bc3 Remove deprecated BRIGHT_BOX preview item 2021-03-20 12:09:20 -04:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young b1fa02bcc8 Push a non-existent ref's value as 0. (Don't just crash.)
Fixes https://gitlab.com/kicad/code/kicad/issues/7971
2021-03-20 11:05:38 +00:00
Jeff Young f0e6f812ff Edit One Field improvements.
1) Accept <enter> as OK if the multiline textbox isn't shown.
2) Focus and select all in first control if multiline textbox isn't shown.
3) Make title be title caps ("Edit Sheet name Field" looked dorky).

Fixes https://gitlab.com/kicad/code/kicad/issues/7940
2021-03-20 00:41:09 +00:00
Jeff Young b4e2db5913 Improve dialog layout. 2021-03-20 00:41:09 +00:00
Jon Evans cc9787e47a Make sure space for message is reserved in APP_PROGRESS_DIALOG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7953
2021-03-19 19:11:32 -04:00
Jeff Young 812d38736e Naming conventions. 2021-03-19 23:06:19 +00:00
Ian McInerney 3036683a2c Move platform-specific init tasks into KIPLATFORM 2021-03-19 21:26:07 +00:00
Ian McInerney 7b4890e578 Cleanup memory in the asset archive reader 2021-03-19 21:23:35 +00:00
Jeff Young 6c3b02aabe Cleanup (no functional changes). 2021-03-19 16:14:34 +00:00
Jon Evans 7231f1dc68 Fix caching strategy
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7960
2021-03-19 12:13:00 -04:00
jean-pierre charras 2fc34bf59c Protect from use of a null pointer. 2021-03-19 15:01:16 +01:00
Jon Evans 472d0e03fc Remove unused color layer 2021-03-18 22:30:24 -04:00
Marek Roszko fee3c41c40 Force string to utf8 before trying to pass it to url encoding
Fix #7878
2021-03-16 23:04:52 -04:00
Jon Evans 045160d486 Work around wxProgressDialog layout bug
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4288
2021-03-16 20:44:24 -04:00
Jon Evans 6d502cb2a5 Don't generate real random UUIDs while loading libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7921
2021-03-17 00:43:13 +00:00
Jeff Young 46d71f0d23 Go back to validate-on-OK, but stop doing design checks.
If we keep doing design validations at two different places, they can
only start to drift apart.  Board Setup should validate for malformed
data ONLY; everything else is the business of DRC.

This also fixes a bug where implementation validations would not allow
OK in the dialog, but wouldn't put up a message to say why.  We now use
the InfoBar impl from Jon's commit for that.
2021-03-16 14:49:03 +00:00
Mikolaj Wielgus c3c3649211 Stop text from causing a shift during flip when >1 items are selected
1e1be730 fixed this only for one item.

Fixes https://gitlab.com/kicad/code/kicad/issues/7304
2021-03-15 21:24:16 +00:00
Jeff Young b2ac9cc29f Formatting & naming conventions. 2021-03-15 19:04:59 +00:00
Mikolaj Wielgus 4e438763a3 Use the same StringFromValue() formatting in Eeschema as in other tools 2021-03-15 15:43:36 +00:00
Jon Evans a9f86c6f3d Enable icon themes for Windows
Windows 10 "dark mode" is not supported and likely won't be,
but high-contrast mode and manual color theme editing is still
possible.
2021-03-14 15:39:47 -04:00
Thomas Pointhuber 4482b3baba altium: Handle special strings and convert them into KiCad variables. Use Comment for VALUE.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7736
2021-03-14 16:40:36 +01:00
jean-pierre charras 953279ce70 Gerber plot: fix missing AperFunction attribute for texts.
Fix also a incorrect AperFunction attribute for graphic items on Edge.Cuts
in footprints
2021-03-14 12:37:13 +01:00
Jon Evans 03b280589e Enable dark icon theme for GTK 2021-03-13 10:54:50 -05:00
Jon Evans e38fe842e2 Don't crash when loading bitmaps before settings exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7900
2021-03-13 09:54:07 -05:00
Jeff Young b71ab01de4 More wxWidgets 3.1 layout adjustments. 2021-03-13 00:00:38 +00:00
Jeff Young faf9cca938 Fix many cases of old mils flag getting interpreted as allowEval flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/7883
2021-03-12 15:15:50 +00:00
Jeff Young ba46a8d12d Fix some layout issues resulting from wxWidgets version bump. 2021-03-12 14:54:54 +00:00
Jon Evans 77d7eae7c3 Fix availability of "other"-sized bitmaps; update some comments 2021-03-11 17:16:49 -05:00
Jon Evans 44f88f840c Bitmaps: a few improvements from review 2021-03-11 08:37:35 -05:00
Jon Evans 405fa183b2 Add icon theme selection behind advanced config flag 2021-03-11 08:37:35 -05:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young 3809f19ce3 Consistent layout. 2021-03-10 16:00:28 +00:00
Jeff Young b47453a93b Fix app names in Quit menu items on Mac. 2021-03-09 16:45:33 +00:00
Thomas Pointhuber 7ef9082c86 altium: add unit-tests for ReadProperties() and fix some issues found while doing so 2021-03-08 23:03:00 +01:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jonathan Haas 3d563af758 Make drawing sheet editor item names translatable. 2021-03-08 16:58:52 +00:00
Jeff Young a088032411 Correct what was meant to be a LINUX compile flag.
(__UNIX__ picks up OSX as well.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7750
2021-03-08 13:49:57 +00:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Jonathan Haas a4b1f9187d Drawing Sheet Editor: Assign a line width before drawing page border 2021-03-07 13:40:38 +00:00
Seth Hillbrand 0d3a0e0dff Move Serbian po
Updates the Serbian language code from sr_RS to sr.  This appears to
work as intended under Debian whereas the full code, despite existing in
the i18n directory was not recognized by wxWidgets or Weblate.
2021-03-05 09:19:58 -08:00
Konstantin Baranovskiy 62f1111c0b Konstantin Baranovskiy in About dialog. 2021-03-03 10:30:10 +02:00
Ian McInerney 908de37e7c Don't hardcode the file extensions where possible 2021-03-03 01:13:59 +00:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01:00
Jeff Young cea779ec0f Implement ctrl-A/ctrl-C on our side rather than relying on wxWidgets.
Hopefully this will make it work on MSWindows as well.  (It worked on
Mac before, but evidently not MSW.  Don't know about GTK.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7771
2021-03-02 11:55:41 +00:00
jean-pierre charras 366189b864 Fix incorrect comments in GESTURE_PSEUDO_ACTION list. 2021-03-02 10:29:39 +01:00
Jon Evans 924accfdc8 Consolidate wxAui art providers 2021-03-01 23:10:03 -05:00
Jon Evans 17bcbdbf56 Disable AuiBar fix until dark icon support is ready 2021-03-01 21:59:19 -05:00
Jon Evans 93578517e4 Support dark mode in AuiBar buttons for wx 3.0 2021-03-01 21:24:29 -05:00
jean-pierre charras 35e6e55bc9 3d stock plugins (dll plugins): fix incorrect path on Linux.
Fixes #7750
https://gitlab.com/kicad/code/kicad/issues/7750
2021-03-01 21:02:47 +01:00
Jeff Young 6e7d7af3c9 Add Reset buttons for mouse and trackpad defaults.
ADDED: Preferences > Mouse and Trackpad > Reset to Mouse Defaults and
Reset to Trackpad Defaults.

Fixes https://gitlab.com/kicad/code/kicad/issues/7681
2021-03-01 14:14:00 +00:00
Jon Evans 5c17ff0595 Libeval: don't try to dereference invalid STRUCT_REF parent
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7764
2021-02-28 14:46:13 -05:00
Jon Evans dbb6d0fb4a Move paste and mask clearance settings back to board file
These are needed for correct Gerber plotting so need to be stored
along with the board file
2021-02-28 14:04:28 -05:00
Jon Evans a70106a3bd Fix search paths for default project template 2021-02-27 20:30:18 -05:00
Jon Evans 77ed62f506 Scroll HTML report box when pushing new lines in immediate mode 2021-02-27 19:55:19 -05:00
Jon Evans a251141d1d Remove extra kicad from Linux plugins path
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7719
2021-02-27 11:02:13 -05:00
Seth Hillbrand 283d176cdc Use std::locale::classic() globally
This is a better alternative when imbuing streams
2021-02-26 17:21:55 -08:00
Marek Roszko c3c777d07f Remove another abandoned function 2021-02-26 19:36:55 -05:00
Jon Evans e4ef531f7d Fix Mac and Linux stock plugins paths 2021-02-26 19:00:52 -05:00
Ian McInerney 451d7c117a Remove unused variable since this option was removed in 86aaa2e9 2021-02-26 18:46:18 +00:00
jean-pierre charras 10990f8e81 Fix a minor compil and a minor Coverity warnings. 2021-02-26 15:33:50 +01:00
Jeff Young 86aaa2e9cb Rationalize footprint bounding boxes and cache all of them.
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 13:50:27 +00:00
Seth Hillbrand 0dca0e752b Reduce the number of built-up calls to DisplayFootprint
When updating the libtree, we modify the tree multiple times to avoid
crashes on Linux.  These generated events that buffered while the widget
was frozen and resulted in redrawing the same footprint 4-10x.

This reduces the buffering by discarding events that are generated
during the freeze and only redrawing when there is a new footprint to
draw
2021-02-25 12:13:42 -08:00
Tomasz Wlostowski a9c54c10a2 VIEW_OVERLAY: support for bitmap text 2021-02-25 17:18:23 +01:00
Jeff Young fcf6511f0c Implement Delete in grid tricks.
Fixes https://gitlab.com/kicad/code/kicad/issues/7703
2021-02-25 15:37:52 +00:00
Jeff Young b8c95345d0 Make sure reporters have a better default path than /bin. 2021-02-25 15:05:26 +00:00
Jeff Young 4d2a1055d3 Save reportHead and reportTail lines as well as report lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/7700
2021-02-25 14:38:41 +00:00
Jeff Young 2c009906e5 Set unprinted layer colors to background.
This allows our Black&White special cases to still work when the
hole annular rings aren't being printed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7692
2021-02-25 14:23:02 +00:00
PJM 7ec46bc346 Pcbnew: Footprint warps to mouse if drag invoked from RMB menu
CHANGED: If the user selected a footprint and then invoked drag from the
RMB menu, the footprint would warp to the mouse center (if set in
preferences) instead of the mouse warping to the footprint center.

There was a call to 'WarpCursor' that was coming after the menu had been
closed and the mouse had already warped to the footprint center.  This made
the footprint jump instead to the old mouse position.

This MR removes the call to 'WarpMouse' and prevents the footprint
from warping to the mouse.

Fixes https://gitlab.com/kicad/code/kicad/issues/7680
2021-02-24 22:19:44 +00:00
Jon Evans 92cc88f87c Tighten up schematic label bounding boxes
Margins were being added in more places than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7689
2021-02-24 17:15:35 -05:00
Wayne Stambaugh 50712f7280 Attempt to fix Coverity issue 305290. 2021-02-24 14:32:34 -05:00
Seth Hillbrand 0bab025832 Fixup toolchaining for immediate mode
The move tool can stack on others, so when we re-enter the previous tool
this caused another immediate action.  We flag re-entry in the tool
stack to check for this and avoid unexpected tool starts
2021-02-24 10:44:54 -08:00
Jon Evans 8dcf5404fc Better UX for handling vertical scroll mapping
Show an error instead of preventing an invalid state
2021-02-24 00:07:17 -05:00
Jon Evans 946073845c Fix typo causing Coverity warning 2021-02-23 22:16:34 -05:00
Jon Evans aedc65f20f Fix footprint editor default grid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7659
2021-02-23 20:07:46 -05:00
Wayne Stambaugh 509b1b7141 Fix for Coverity issue 157131.
Don't allow exception to be thrown from OPENGL_COMPOSITOR dtor.
2021-02-23 19:09:41 -05:00
Jeff Young efae25e24e Splitter bar for netclass setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/7668
2021-02-23 15:06:41 +00:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Seth Hillbrand 507ca9bc73 Add DPI scaling to KIPLATFORM
GTK needs to check current scaling but wx doesn't provide this
functionality in 3.0, so we can bypass by going straight to the source.
2021-02-22 17:38:27 -08:00
Adam Wolf 90cb82b32d Install translations into macOS bundle. 2021-02-22 23:36:08 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Roberto Fernandez Bautista 5acdf1ddb1 CADSTAR Schematic Archive Importer: Align to original grid
Previous assumption of 100mil grid in CADSTAR schematic designs has
been proven to be incorrect. Let's use the "working grid" in the
original design instead.
2021-02-22 13:24:00 +00:00
Roberto Fernandez Bautista 09ebfcd650 CADSTAR Importer: Fix Code Style
- Rename member variable names to use the 'm_' prefix
- Rename a few object types that clashed with KiCad object names, such
  as BOARD and SCHEMATIC, to avoid the use of '::' to access the KiCad
  objects.
- Remove some unused code.
2021-02-22 13:24:00 +00:00
Wayne Stambaugh be8327bd54 GAL memory allocation fixes.
Vertex memory allocation uses malloc and realloc without checking the
result.  Throw exceptions that can be caught in the DoRepaint() method
in EDA_DRAW_PANEL_GAL when malloc and realloc return a null pointer.
2021-02-22 08:15:09 -05:00
Jeff Young 41b8ef85e3 Fix preferences on OSX. 2021-02-22 11:05:47 +00:00
Jeff Young 4fd49cd261 Fix odd header change by CLion. 2021-02-22 11:05:47 +00:00
Jon Evans f1039dfb94 Disable project saving outside explicit save actions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7589
2021-02-21 21:31:45 -05:00
Jon Evans 6fa0ac45af Re-enable custom grid settings for Pcbnew
Add a reset button that will only show up if the user
edits the JSON configuration for grids. This is a temporary
measure until we have a real grid editor GUI in V7.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7595
2021-02-21 15:33:13 -05:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Mikolaj Wielgus f9c42585fb Force immediate action for auto start wire feature
Fixes https://gitlab.com/kicad/code/kicad/issues/7503
2021-02-21 18:43:34 +00:00
Jon Evans 3bc9d7b95e Rework GAL layer enum to fix visibility import from legacy boards 2021-02-21 13:41:43 -05:00
jean-pierre charras f43c639a4d Fix issue with predefined variable texts ${COMMENT0} to ${COMMENT9}
- remove ${COMMENT0}, that was broken (returned the same as ${COMPANY}.
- So ${COMMENT1} to ${COMMENT9} are only recognized for Comment1 to Comment9
  in page settings dlg, and are equivalent to our old %C0 to %C8 format string
- fix a minor coding style issue.
Fixes #7642
https://gitlab.com/kicad/code/kicad/issues/7642
2021-02-21 18:29:14 +01:00
Jon Evans f76e54bd8b Fix generation of translated hotkey tables 2021-02-20 13:55:10 -05:00
Jon Evans 7b64389062 Add a helper to generate action documentation 2021-02-20 13:41:49 -05:00
Marek Roszko 907e282347 Silence some msvc warnings
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Seth Hillbrand d9d906e652 Take file size into account in cache hash
Revision control systems can play games with file timestamps.  If the
file has changed size, we should reload it as well.

Fixes https://gitlab.com/kicad/code/kicad/issues/7627
2021-02-20 06:27:12 -08:00
Tokita, Hiroshi 9da55d961a Make the descriptions of pin/unpin library translatable 2021-02-19 20:24:49 +00:00
Seth Hillbrand 05b559c9dc Quiet gcc warnings 2021-02-18 11:20:27 -08:00
Jeff Young 66b33834b5 Always enable save; move dirty bit to asterisk in title bar.
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Jeff Young 6a5bba2a80 We don't really want users hand-editing library table files.
Fixes https://gitlab.com/kicad/code/kicad/issues/7591
2021-02-18 11:53:36 +00:00
Jeff Young fd91529d88 Quiet Coverity. 2021-02-18 11:53:36 +00:00
jean-pierre charras 5d2dc0b50e Fix a few (minor) issues:
- Make DIALOG_SHIM::SetPosition working)
- rename PCB_BASE_FRAME::SelectLayer() to PCB_BASE_FRAME::SelectOneLayer()
- PCB_BASE_FRAME::SelectOneLayer(): make dismiss dialog by escape key working.
Fixes #7578
https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-17 20:56:43 +01:00
Jeff Young b6a7981e62 Write changes back to grid after using file explorer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7361
2021-02-17 14:08:53 +00:00
Marek Roszko 0d98db2eb3 Lowercase check the kicad data dir name in the macos app check
macOS is case insensitive anyway
2021-02-16 23:30:19 -05:00
Marek Roszko b609c7dcd6 Kick the osx specific path helpers into PATHS 2021-02-16 23:29:26 -05:00
Jon Evans 13a91dd49d Allow overriding documents home with an env var
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7543
2021-02-16 20:44:53 -05:00
Seth Hillbrand dbbe9cdee4 Hide infobar for save when saving 2021-02-16 15:54:43 -08:00
Wayne Stambaugh b959378d58 Attempt to fix Coverity issue 168705. 2021-02-16 17:29:12 -05:00
Wayne Stambaugh e7227a4f21 GAL code cleaning. 2021-02-16 17:25:27 -05:00
Seth Hillbrand df573255e0 Fix crash when switching schematics
When switching schematics that causes an error message (for example if
the schematic needs repair), wx can refresh in between view updates,
leading to a null preview.
2021-02-16 10:12:30 -08:00
Jeff Young f3449452db Special case kicad manager default frame sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7559
2021-02-16 16:24:36 +00:00
Seth Hillbrand 2566547377 Make mac-default delete happy
On mac, the backspace key is commonly used from removing items.  The
forward delete key doesn't really exist (it is hidden behind
fn-backspace), so this modifies our common use of delete.  The
context-dependent usage in router and polygon creation are unaffected as
CONTEXT overrides GLOBAL when processing
2021-02-15 15:04:44 -08:00
Zoltan Gyarmati f997deec75 eeschema: fixing title block variable expanding in text objects
Also fixing an off-by-one error, which also affects pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7489
2021-02-15 22:24:05 +00:00
Wayne Stambaugh 089b7afacf Eeschema: Eagle schematic plugin parser improvements.
* Fix multi line text alignment.
* Parse schematic frame objects and convert them to lines.
* Make implicit global labels normal size so they can easily be seen.
* Move sheet fields to a more sensible position.
* Parse schematic symbol instances before wires so that the implicit power
  connections can properly be tested.  This will be used at a later time.
* Scale label text size down to allow for differences in label offset and
  graphical items.
2021-02-15 16:44:58 -05:00
Seth Hillbrand d93ba0a06a Choose half-grid for mirror
Using the half-grid allows for odd-grid counts to remain on-grid,
closer to the actual center.

Fixes https://gitlab.com/kicad/code/kicad/issues/7493
2021-02-15 11:59:04 -08:00
Jon Evans 5433adda2e Add extra search paths for importing settings in FlatPak builds 2021-02-14 15:04:42 -05:00
Jeff Young 60d4d5b846 Scale down netnames on tracks so overbars fit.
Also fixes a bug where the overbar ignored the color opacity.

Fixes https://gitlab.com/kicad/code/kicad/issues/7524
2021-02-14 12:15:26 +00:00
Jon Evans e06aa32780 Launcher tweaks 2021-02-13 08:59:33 -05:00
jean-pierre charras c69cdaff7c Fix a minor wxWidgets alert.
Fixes #7513
https://gitlab.com/kicad/code/kicad/issues/7513
2021-02-13 12:56:12 +01:00
Jon Evans 884de1f932 Allow translations to load from build dir 2021-02-12 22:39:37 -05:00
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Seth Hillbrand d244c09680 Cleanup undo/redo
Mirror/Rotate/etc were all just "Change" items in the undo/redo stack.
This removes the old calls
2021-02-12 10:25:14 -08:00
Jon Evans ab34d94f36 Add a less-intrusive validation system to board setup
For some kinds of issues, we want a way to point them out but
we don't need to keep the user from being able to close the
dialog.  A separate Validate button lets the user check for
issues if desired, but these issues are not "fatal" and can
be ignored if the user wishes.
2021-02-11 22:19:46 -05:00
Jon Evans b708fd36ae Add tooltips to netclass setup panel column headers
Change router tooltips to be more straightforward
2021-02-11 20:50:26 -05:00
Jon Evans af7e4c6ca0 Don't try to pull invalid data from JSON
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7494
2021-02-11 17:25:14 -05:00
Mikolaj Wielgus 1dc0ef01b3 Fix automatic wire tool in gridless mode
The automatic wire tool was not working in the gridless mode because the
grid snapping on/off logic present in `EE_GRID_HELPER`, based on the
value of `m_enableGrid`, was not taking into account that another check,
but for the global KiCad setting, would be performed in the `Align()`
method, which is inherited from `GRID_HELPER`.

I've modified all tests of `m_enableGrid` value to also take the global
setting into account, and moved checks for it to `Align()` method, as
it's more consistent this way.

I've also removed an override of the `Align()` method in the
`PCB_GRID_HELPER` class, as it was made redundant by my changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/7402
2021-02-10 22:07:49 +00:00
Roberto Fernandez Bautista f530b12c31 CADSTAR Schematic Archive Importer: Handle undefined pin number in part
Use terminal pin number (i.e. from the symbol definition) when the pin
number is undefined in the part.
This fixes a bug that resulted in symbols with "0" as the pin numbers.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista cc27c31ab0 CADSTAR Schematic Archive Importer: Import common fields visibilities
Import field visibilities for Ref, Value and Part Name
Also fix incorrect loading of designator from previous commit
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 297ff282f1 CADSTAR Importer: Update copyright years and remove white spaces 2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista b0051c07cb CADSTAR Schematic Archive Importer: Load all fields in symbols
- Load Fields in the library items as well as schematic instances
- Remove invalid characters (e.g. '\n', '\t', '\r') in fields
- Load footprint field (assume that the footprint library name
  is the same as the filename of the schematic)
2021-02-10 18:49:20 +00:00
Jeff Young a30ae6a237 Pass un-pretty-printed bus names through menu help text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7412
2021-02-10 15:03:06 +00:00
Seth Hillbrand 430310bb75 Add identifying info per request
We don't use e-mail addresses for contributors in the about box these
days.  The field is re-purposed as an optional additional field to allow
for disambiguation of contributors, should they request it.
2021-02-09 17:26:13 -08:00
Jon Evans 9ce255dc77 Use a different color for front and back courtyards 2021-02-09 20:15:30 -05:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Seth Hillbrand 505844f68c Generalize the Ctrl-Q to all frames
Rather than adding our handler to each frame separately, we initialize
the Ctrl-Q quit action at the base frame to be consistent
2021-02-09 11:43:42 -08:00
Seth Hillbrand 3d920c4088 Fix tab spacing to use widest character as ref
We had been using each 4th column of spaces.  But we needed an absolute
spacing rather than relative to the existing text to match spacing
between the input text box and our stroke font
2021-02-09 09:44:00 -08:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
Jeff Young 02aca4a7d7 Don't run off the end of a string.
Fixes https://gitlab.com/kicad/code/kicad/issues/7461
2021-02-08 12:28:15 +00:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Thomas Pointhuber c255dede17 altium: loosen up ReadProperties check a bit, to allow reading of likely malformed altium files. 2021-02-07 16:52:31 +01:00
Jeff Young f6aa25df52 Make bitmap text measuring cognizant of overbars.
Also adds fallback for when text contains super- or subscript.

Fixes https://gitlab.com/kicad/code/kicad/issues/6846
2021-02-07 13:59:53 +00:00
Michael Kavanagh 404d18763d Icons: try a new version of the 'new' badge
and use it more consistently.
2021-02-06 22:51:56 +00:00
Jeff Young ac479a1c75 Fix regression in immediate actions.
Add some more comments to attempt to document our egregious series
of hacks over this.

Fixes https://gitlab.com/kicad/code/kicad/issues/7432
2021-02-05 16:18:28 +00:00
Jeff Young 2ad5108e7d Don't depend on wxWidgets dotted and dashed line styles.
Turns out they're buggy on OSX.

Fixes https://gitlab.com/kicad/code/kicad/issues/7144
2021-02-05 16:18:28 +00:00
Marek Roszko 1572d90ee7 Revert "Always return a path if we can't normalize it"
This reverts commit 7bdea16b1f.
2021-02-05 00:49:34 -05:00
Marek Roszko 7bdea16b1f Always return a path if we can't normalize it
Fix #7323
2021-02-04 23:55:18 -05:00
Jon Evans 7a55dff566 Archiver: reduce set of archived files for auto-backup
Keep around only source files that are modified by KiCad;
other files can be re-generated.
2021-02-04 17:24:13 -05:00
Seth Hillbrand 4657ca5d4f Fix GTK crash when multiple libraries are expanded
Once more into the gtk_tree_view breach.

This may also be related to https://gitlab.com/kicad/code/kicad/-/issues/7344

Fixes https://gitlab.com/kicad/code/kicad/issues/7422
2021-02-04 13:20:33 -08:00
Jon Evans d25341901c Skip backup if project folder isn't writeable
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7405
2021-02-03 19:17:32 -05:00
Jon Evans 3ac5fd6342 Get rid of wx popups when opening a read-only project 2021-02-03 19:17:32 -05:00
Seth Hillbrand 238aa2b5b0 Snap to eeschema lines
Allows easier snapping to lines when drawing in eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/7378
2021-02-02 19:33:18 -08:00
Jon Evans 4db7a5af56 Make sure print mode is off by default
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7388
2021-02-02 21:21:16 -05:00
Roberto Fernandez Bautista 098241e403 About->Version info. Allow clipboard data to be available after closing KiCad.
Fixes a bug in GTK that erased the data on the clipboard after exiting KiCad.
2021-02-03 01:55:05 +00:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Jeff Young b8e97bb6b6 Only apply B&W printer fixes when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7388
2021-02-02 15:37:30 +00:00
Jeff Young 7688fdc94f Hack to prevent multiple simulation commands from stacking up.
Can happen if someone hammers away on the probe and/or tune tools
without ever mousing over the schematic in between.

*May* fix the below bug.

Fixes https://gitlab.com/kicad/code/kicad/issues/6876
2021-02-02 01:23:22 +00:00
Jeff Young 1394c1f4d4 Retire disabled buttons in favour of info boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7229
2021-02-01 22:56:55 +00:00
Jon Evans eba98aa9f6 Change default Ctrl+H hotkey to 3-state layer view mode 2021-02-01 17:37:17 -05:00
Wayne Stambaugh c11ded24cd Add instrumentation to track down local issues in symbol library file code. 2021-02-01 12:57:16 -05:00
Jeff Young 1f27b7e7df Don't render hole walls when no physical layers are visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/7369
2021-02-01 17:14:30 +00:00
Marek Roszko 47ada0ffba Remove duplicate LAYER_VIA_THROUGH entry in theme 2021-02-01 11:51:42 -05:00
Marek Roszko 32bf88fa8e Point to the user template path by default in pl editor 2021-01-31 23:57:41 -05:00
Seth Hillbrand 0125986588 Remove unused grid button
Fixes https://gitlab.com/kicad/code/kicad/issues/7360
2021-01-31 13:55:10 -08:00
Marek Roszko 9770ba9739 Fix odd/even check in cairo. Modulo 1 is always 0 on ints. 2021-01-31 11:59:49 -05:00
Thomas Pointhuber db3b79a046 altium: Fix #6462 improve parsing of metric units
Because Altium uses imperial units for storage, this leads to rounding errors.
This code tries to correct those rounding errors for the user.
2021-01-31 16:18:57 +01:00
Jon Evans abf0a46dce Refactor PICKER_TOOL and push up snapping disable functionality
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7348
2021-01-31 09:50:41 -05:00
Thomas Pointhuber 9ddfd82b91 altium: Fix #6242 by increasing clamp limit for unit conversation. Furthermore fix error which happens when parsing negative units. 2021-01-31 13:59:51 +01:00
jean-pierre charras c155218582 Sim plot: fix a rounding issue that can create a missing point in a plot.
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes #7345
https://gitlab.com/kicad/code/kicad/issues/7345
2021-01-31 10:36:26 +01:00
Mikolaj Wielgus 8eca23aabe Mark null project initial screen as zoom-initialized
The variable `m_Initialized` in `BASE_SCREEN` is used by
`SCH_EDIT_FRAME` to mark whether a screen had its zoom level initialized
by the "zoom to fit screen" action. When this variable is `false`, the
function `SCH_EDIT_FRAME::DisplayCurrentSheet()` performs "zoom to fit
screen", modifying the zoom level. This function is indirectly called in
the undo routines, so if `m_Initialized` is not set to `true`, a zoom
change will occur when the user undoes an operation, a behavior that is
undesired.

`m_Initialized` was not initialized to `true` for the null schematic
(the schematic that is loaded if no project is loaded), causing the
aforementioned undesired behavior.

To prevent this, I've changed the `SCH_EDIT_FRAME` constructor to set
`m_Initialized` to `true`, since it zooms to fit screen already. I've
moved `m_Initialized` from `BASE_SCREEN` to `SCH_SCREEN`, as it is used
only in Eeschema, and renamed it to `m_zoomInitialized`, a name I
believe that better describes what this variable does.

I've also introduced the function `SCH_EDIT_FRAME::initScreenZoom()` to
group the "zoom to fit screen" action with setting `m_Initialized` to
`true`, as they often should occur together.

I'd also like to say that I'm not confident whether
`SCH_EDIT_FRAME::DisplayCurrentSheet()` should perform the zoom level
initialization at this point, but I have decided to not change this
behavior for now, as the commit history suggests it's several years old.

Fixes https://gitlab.com/kicad/code/kicad/issues/7343
2021-01-31 00:49:11 +00:00
Mikolaj Wielgus a6b2fb3819 Page layout editor: Fix bitmap bounding box
Fixes https://gitlab.com/kicad/code/kicad/issues/7315
2021-01-30 20:39:16 +00:00
jean-pierre charras fabafe719d Use aperture macro for custom pads. Optimize aperture macros for free polygons.
These aperture macros were previously used but only for chamfered round rect.
They are now also used for custom pads (previously drawn as regions).
They are also optimized, i.e. only one aperture macro is created for a given shape.
(previously, one aperture macro was created for each chamfered round rect pad.)

So now all pads are flashed.
2021-01-30 18:14:58 +01:00
Jeff Young a235103e48 Redo pad & via painting (again).
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.

Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.

Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast.  The hole wall
is drawn in high contrast.  This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).

Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
Seth Hillbrand af3789571e Refresh screen after canvas switch
Fixes https://gitlab.com/kicad/code/kicad/issues/7335
2021-01-29 15:33:32 -08:00
jean-pierre charras 7a56608cd5 Fix incorrect path of 3d stock plugins.
Fixes #7330
https://gitlab.com/kicad/code/kicad/issues/7330
2021-01-29 19:29:52 +01:00
Jeff Young 6983bcd55b Push addition of shape width down into computeArcBBox.
Also improves performance by calling GetBoundingBox only once (this
is not always an inexpensive routine for some items, such as
polygons).
2021-01-28 22:29:28 +00:00
Jeff Young 1a7b7e84c6 Use consistent terminology for component placement files.
CHANGED footprint positions files -> component placement files.

Not all footprints get placed, so component is a more neutral word.
Use of "placement" instead of "positions" removes the double-plural
that makes footprint positions files such a mouth-full.

Fixes https://gitlab.com/kicad/code/kicad/issues/7097
2021-01-28 19:24:55 +00:00
Seth Hillbrand 945faba586 Wrap CTOR in try/catch for context errors 2021-01-28 10:55:27 -08:00
Marek Roszko 78dbcdcdb7 Slight fixup to previous library browse change 2021-01-28 07:31:32 -05:00
Jeff Young f0aa6aa442 Fix drop-down-too-narrow-on-first-drop bug. 2021-01-28 11:35:18 +00:00
Marek Roszko a373abd68a Invert the new symbol library flow to push users to default to a different folder for global symbols 2021-01-28 00:40:21 -05:00
Marek Roszko 4c14406788 Further path refinements 2021-01-27 21:48:02 -05:00
Ian McInerney fdf6318218 Ensure cmake commands depend on the cmake file they use
Without this dependency, the build stage won't rerun
if the CMake file changes on disk.
2021-01-28 00:24:22 +00:00
Ian McInerney beb50c529e Reorganize the CMake folder to separate build and configure steps
The BuildSteps folder now contains the CMake scripts that are
called during the build process as individual stages, while
the root CMakeModules directory contains the CMake files used
during the configuration phase.
2021-01-28 00:24:22 +00:00
Marek Roszko a47e8af0d0 Fix up naming of the kiplatform helpers 2021-01-27 19:12:20 -05:00
Marek Roszko 6d4bae1136 Make calculateUserSettingsPath a little more compact and use kiplatform 2021-01-27 19:12:20 -05:00