Commit Graph

4828 Commits

Author SHA1 Message Date
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
Marek Roszko 04ab71c47c Tweaks to build 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 6fbbba8db3 Adding Python shell KIFACE 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
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
Jeff Young 0598c82972 Terminology (use present tense for flags). 2021-05-31 12:26:44 +01:00
Marek Roszko 382dca4e6f Fix uninitialized member warnings
Based on PVS Studio report
2021-05-30 20:01:01 -04:00
Tomasz Wlostowski 2b955437b6 VIEW_OVERLAY: add Get[Fill/Stroke]Color methods. 2021-05-31 00:15:16 +02:00
Jon Evans eff9746f34 CHANGED: Net highlight in PcbNew is now persistent to match Eeschema
CHANGED: Highlight net tool changed to highlight display toggle; moved to left toolbar
CHANGED: Multi-net highlight is now accessible when using the highlight net action
ADDED: Highlight Net and Clear Highlight actions to Net Tools context menu
ADDED: Default hotkey (Ctrl+`) for toggling net highlighting

The current and previous net highlight state are now stored and can be toggled
on or off with an action (no hotkey by default).

Highlight is now treated as a persistent state rather than a tool that is entered,
meaning there is no longer a special tool to enter in order to highlight nets.
Highlighting can be controlled while any other tool is active using the hotkeys
or context menu on a net object.

Tweak the icons for highlight net and layer display mode to better disambiguate them.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8250
2021-05-29 12:40:24 -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
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 b1dcf74042 Use standard "Untitled" name for files without names
Also translates to provide useful information regardless of language
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
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 224d258474 A bit of safety.
Should also silence Coverity.
2021-05-17 10:45:26 +01: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
Jon Evans bc6b9b527a Allow stackup height to be excluded from length calculations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8384
2021-05-10 22:11:58 -04: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
Ian McInerney 916a15793f Fix some OSX compiler warnings 2021-05-09 12:59:57 +01:00
jean-pierre charras 1c6f291bcd EDA_BASE_FRAME: add accessor to m_ident (useful in debug) 2021-05-09 08:41:41 +02:00
jean-pierre charras 56058314be Fix minor Coverity warnings and minor compil warnings.
(uninitialized or shadowed vars)
2021-05-05 08:58:55 +02:00
Jon Evans b986797469 Move pcb calculator to new bitmap system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8324
2021-05-03 22:28:25 -04: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
Tomasz Wlostowski 69e1891e42 common: add PROPERTY::IsValueDefined() 2021-05-03 23:45:54 +02: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 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
Ian McInerney ad705e1065 Formatting 2021-05-03 15:47:55 +01: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
Jon Evans a82a693d20 PARAM_LAMBDA: Fix implementation of MatchesFile 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 3a9a85b373 Enum class PAD_PROP_T
Renamed such that it does not affect python
2021-05-01 10:58:30 -04:00
Marek Roszko 03cf2b517f Enum class PAD_ATTR_T
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Marek Roszko 21fde9b629 enum class PCB_SHAPE_TYPE_T 2021-04-30 22:36:12 -04:00
Jon Evans 64d35ecebc Enable dark mode for MacOS 2021-04-28 23:24:19 -04:00
Jonathan Haas 075bd788eb Remove unused OBSTACLE_VISITOR::m_extraClearance 2021-04-23 01:53:09 +00: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
Wayne Stambaugh 54e18f6b1f Pcbnew: remove update schematic option for geographical annotation dialog.
REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates.  Use "Update
Schematic from PCB" tool to update reference designation changes.

Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state.  The update schematic from board tool is
the correct method to sync any changes from the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
2021-04-22 12:45:59 -04: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 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