Commit Graph

4586 Commits

Author SHA1 Message Date
Tomasz Wlostowski 466cbe2f00 libeval_compiler: fixhandling of method calls with empty argument list (e.g. 'A.method()' ) 2020-09-08 01:31:42 +02:00
Jon Evans 147540b3bb ADDED: Control to only show ratsnest for visible layers 2020-09-07 16:43:43 -04:00
Jon Evans 758a4c26d5 Switch appearance panel to custom collapsible pane widget
The new widget looks the same on all platforms and fixes a few
bugs with the wxWidgets version
2020-09-06 22:43:39 -04:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00
Ian McInerney f28b60896c Allow toolbar items to cancel tools when pressed
There was a regression in v6 where the zoom to selection toolbar
item wasn't canceling the tool when pressed and the tool was active
(it was in v5). This implements a more generic framework for canceling
tools on button presses.

Fixes https://gitlab.com/kicad/code/kicad/issues/5103
2020-09-05 01:49:38 +01:00
Jeff Young 08dee31d9e Try and unify the background colors between panels and platforms.
Also moves to WX_GRID to get rid of some wxGrid bugs, and moves the
provision of attrs to the GRID_TABLE (as those applied to the grid
are ignored when a table is specified).

Fixes https://gitlab.com/kicad/code/kicad/issues/5260
2020-09-04 20:47:50 +01:00
Jeff Young 2736becb8b Fix typo in Toggle Layers action and add descriptions to hotkeys lists.
Fixes https://gitlab.com/kicad/code/kicad/issues/5494
2020-09-04 17:45:07 +01:00
Jeff Young 3573c8b967 ADDED hotkey for comment/uncomment line(s) in Scintilla.
Useful primarily for DRC Rules editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-03 20:37:05 +01:00
Jeff Young d1006138fd ADDED holeWallPlatingThickness to AdvancedCfg.
Used for zone filling and DRC hole collision testing.  Allows us to
calculate the actual hole size from the finish hole size.

Fixes https://gitlab.com/kicad/code/kicad/issues/5468
2020-09-03 16:00:07 +01:00
Jeff Young 38e9217d54 Consolidate all DRC epsilon/threshold values to a single advancedCfg setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5464
2020-09-03 15:03:09 +01:00
Jeff Young 450519a4bd Sometimes a DRAW_PANEL_GAL wants its immediate parent and sometimes not.
For instance, we get things like high-contrast-mode from the pad
dialog when rendering a pad preview, but we want the colours from the
parent PCB_BASE_FRAME.
2020-09-03 15:03:09 +01:00
Ian McInerney cb36006406 First round of cleanup for the PCB groups
ADDED: Leave group action

Fixes https://gitlab.com/kicad/code/kicad/issues/5299
2020-09-02 02:10:26 +01:00
Ian McInerney 8bdf25d3e2 Show an error message when switching to a language that isn't installed
Also, ensure that the language names are not translated in the menus
and messages, since they are already translated in the code.

Fixes https://gitlab.com/kicad/code/kicad/issues/5324
2020-09-02 00:10:25 +01:00
Ian McInerney 1b4ec6ccb5 Display symbol libraries that couldn't be loaded as disabled text
Fixes https://gitlab.com/kicad/code/kicad/issues/5092
2020-09-02 00:10:25 +01:00
jean-pierre charras 9fdadcbcf5 EDA_BASE_FRAME::windowClosing( wxCloseEvent& event ): fix incorrect behavior.
windowClosing() calls Destroy() when the wxCloseEvent has no veto.
This is fine for usual EDA_BASE_FRAME frames, but not for frames shown in modal mode.
In modal mode, windowClosing() should not call Destroy(), because the calling frame
expects the instance not deleted after closing.
(the caller has to call Destroy() only once the frame can be actually deleted)
2020-09-01 17:46:17 +02:00
Mark Roszko 9f128f942c Move shutdown blocker to kiplatform 2020-09-01 10:14:51 +00:00
Mark Roszko a9532c2fa1 Add browse button to footprint 3d settings
Add normalization to 3d settings and footprint library table editor
2020-09-01 02:00:38 +00:00
Jeff Young 2697fc3864 Remove canvas-switching from OSX.
The Cairo renderer doesn't work on Retina displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/4788
2020-08-31 18:48:25 +01:00
Jeff Young 64c4d3e532 Fix bone-headed comment from previous commit. 2020-08-31 14:33:08 +01:00
Jeff Young 88635ee5b6 Clean up error messages.
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jeff Young 091f769106 Add infobar error message for Autoplace when board not defined.
Fixes https://gitlab.com/kicad/code/kicad/issues/5425
2020-08-31 12:54:45 +01:00
Jon Evans 9f7bca38b3 A better way of handling standalone project files 2020-08-30 16:04:39 -04:00
Jeff Young 20211eed49 Unroll a level of prefs for fieldname templates.
It was playing havoc with the saving of project and global templates
without one overwriting the other.

Fixes https://gitlab.com/kicad/code/kicad/issues/5415
2020-08-30 18:58:18 +01:00
Jeff Young 305abb210f Add a mode to allow zone smoothing to produce external fillets.
Fixes https://gitlab.com/kicad/code/kicad/issues/5306
2020-08-30 15:20:59 +01:00
Fabien Corona 4a0d6297ab pcbnew: Add an alternate edit method for arcs
The alternate edit methods keeps the radius constant

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5369
2020-08-29 22:59:11 +00:00
Jeff Young cc64709407 Reimplement skip-parent-page to work with MacHack.
This prevents the "leaking" pages where the layers panel is shown
in the background of all other panels.

Fixes https://gitlab.com/kicad/code/kicad/issues/5182
2020-08-29 20:53:53 +01:00
Jon Evans 19832c7599 ADDED: Tool for converting shape types in PcbNew
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2406
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2507
2020-08-28 21:16:06 -04:00
Ian McInerney a0d84e94fd Use move to trash to the project manager instead of immediate delete
CHANGED: Delete in the project manager now moves files to the trash can

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2499
2020-08-28 23:00:43 +00:00
Seth Hillbrand 1e461c2259 ADDED: Improved center point dragging
The center point on polygons now maintains the axis of the dragged line
and, optionally with Ctrl pressed, maintains the slope of the adjacent
segments as well.

This also fixes a longstanding issue that prevented the ctrl-snapping
from using the original point rather than the last updated point when
constraining.

Fixes https://gitlab.com/kicad/code/kicad/issues/2465
2020-08-27 10:34:12 -07:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Reece R. Pollack 6f1204cfd7 Add Display Origin Transforms support to the PCB_BASE_FRAME class
This commit adds support for display origin transforms to the PCB_BASE_FRAME
class. This instantiates a PCB_ORIGIN_TRANSFORMS object, and overrides the
GetOriginTransforms method in the EDA_DRAW_FRAME class to reference it.

The formatting of the status line has been updated to display coordinates
relative to the user-selected origin, and with the coordinates increasing
in the user-selected direction.
2020-08-26 17:54:22 +00:00
Reece R. Pollack 2895d664e6 Add Display Origin Transform data to the PCB_DISPLAY_OPTIONS class
This commit adds the user configuration options to support display
origin transforms to the PCB_DISPLAY_OPTIONS class. This data is
configured by the "Origins & Axes" preferences panel added in a
later commit.
2020-08-26 17:54:21 +00:00
Reece R. Pollack 6e25b7d455 Add ORIGIN_TRANSFORMS to the UNIT_BINDER and EDA_DRAW_FRAME classes
This commit modifies the UNIT_BINDER class to invoke the ORIGIN_TRANSFORMS
methods to support Display Origin Transforms.

The EDA_DRAW_FRAME class is modified to instantiate an ORIGIN_TRANSFORMS
object providing null transforms. A function is provided to allow the
UNIT_BINDER to find the ORIGIN_TRANSFORMS object in an overrideable manner.
2020-08-26 17:54:21 +00:00
Reece R. Pollack 3fec2805ec Add the ORIGIN_TRANSFORMS class
This commit adds the ORIGIN_TRANSFORMS class to support Display Origin
Transforms in all KiCad applications.

Functions are provided to perform four basic types of origin coordinate
transforms:
  * Transform a relative coordinate from internal to display form
  * Transform a relative coordinate from display to internal form
  * Transform an absolute coordinate from internal to display form
  * Transform an absolute coordinate from display to internal form

These functions are supported for data types "int", "long long int",
and "double". The default implementations for all but "int" simply
return their input unchanged; the implementation for "int" invokes
the implementation for "long long int".

The expectation is that the different KiCad applications will create
derived classes from this base class and override the functions as
needed. Protected template functions are provided for the standard
translations to maintain consistency within the derived classes.
2020-08-26 17:54:21 +00:00
Jeff Young 050bbcdb4f Fix error reporting from function pre-flighting. 2020-08-26 12:56:17 +01:00
Jeff Young 1138c32bf3 Don't pass Cancel event where there was a specific action cancelled.
For instance, if during a move the user hits ESC they only want the
move cancelled, not (for instance) the selection dropped.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-25 12:54:40 +01:00
Jon Evans 24435fcc62 Don't create new project files when opening boards/schematics
Display warning infobar in the board/schematic setup when no project
is loaded, since most of the settings in those dialogs are saved in
the project and not in the board/schematic file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4868
2020-08-24 22:17:21 -04:00
Jon Evans 5e2946ef90 Use full net names in netclasses
Short net names are not unique; full names with paths must be used.
Added a grid cell renderer that does the escaping, to make it easier
to display net names in grid cells.

Once you unescape a net name, you can't go back to the escaped form
because you can't assume which `/` should be {slash} and which `/`
Because of this, we cannot use Unescape/Escape on the data model in
the netclass setup panel, and instead do the Unescape in the view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5331
2020-08-24 21:19:07 -04:00
Jeff Young 15c136ead2 Make a bunch of help dialogs modeless.
Fixes https://gitlab.com/kicad/code/kicad/issues/5334
2020-08-24 23:17:33 +01:00
Jeff Young b8bbe72e48 Another attempt to fix the select-reference-point toolstack thing.
This time remove the push/pop from the picker tools as that's
responsible for the issue of trying to re-activate the move action
when its popped.  Instead do the push/pop from the client code
of other actions that need it, and not at all from the move-with-
reference action.

Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 22:47:24 +01:00
Jeff Young a4ff339a1e Clear toolstack after cancel.
Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 19:28:53 +01:00
Jon Evans 3673c23696 Code style 2020-08-23 22:10:05 -04:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Ian McInerney 2f7094b352 Cleanup some unused variables
* Make the app progress indicator only have the indeterminate state
  when the taskbar indicator is used (causes an uused variable warning
  on wx<3.1)
* Remove unused dry run variable in pcb_netlist.h
* Remove unused forceDropAnnotations from the paste special dialog
  since the dialog only controls keeping them.
2020-08-24 01:51:23 +01:00
Thomas Pointhuber a03fb7a9a8 Altium: Refactor and add initial structure for schematic importer
altium: move pcbnew/altium2kicadpcb_plugin -> pcbnew/plugins/altium

See: https://gitlab.com/kicad/code/kicad/-/issues/4412
2020-08-23 19:01:08 +00:00
Jon Evans 6720473db9 Move net visibility/color controls to a wxGrid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5235
Might improve https://gitlab.com/kicad/code/kicad/-/issues/5210
2020-08-23 13:15:07 -04:00
Jon Evans 625f0afcff Fix link issue on MSVC (thanks @mroszko)
wxScrolledCanvas is not properly exported, so when we
add a wxGrid it has a chance of creating linker errors.
Including the wx/grid.h ensures that the linker does not
see two conflicting symbols between gal and the other
place where wxGrid is used.
2020-08-23 12:57:44 -04:00
Jeff Young 80846dcbc7 Improve shutdown performance. 2020-08-21 19:12:51 +01:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01:00
Seth Hillbrand 1e315bc3fe pcbnew: Add "Select All" Action to pcbnew and fpedit
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Ian McInerney c479deaf02 Use groups when doing graphics import
ADDED: Allow DXF/SVG graphics to be imported as a group

Also, cleanup the placement routine to allow the edit tool's flip
and rotate routines to be used when placing the items.
2020-08-20 01:22:48 +01:00
Jeff Young 27b047ab3f Cache project text vars as properties in the PCB board file.
Fixes https://gitlab.com/kicad/code/kicad/issues/5255

Fixes https://gitlab.com/kicad/code/kicad/issues/5005
2020-08-19 19:32:20 +01:00
Jon Evans eb9756840d Better defaults for brightness factors
Also store them in the JSON so they can be tweaked
2020-08-18 20:55:39 -04:00
Jeff Young 1711b489b6 Dark-mode proof the undefined colour swatch. 2020-08-18 19:05:30 +01:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Marek Roszko a417da4ce0 Split selecteditemmodified to a selecteditemmoved to reduce updatemsgpanel spam 2020-08-18 13:11:47 +00:00
Seth Hillbrand 6381f80bfa Remove flags icons and abandoned languages
Flags != language  See http://www.flagsarenotlanguages.com We now use
local, untranslated language names for all languages.

Languages that have not been updated in >5 years and have less than 15%
of available strings translated have been removed from the menu options.
If a translator steps up to update the .po files, we can re-add them
2020-08-18 05:32:21 -07:00
Ian McInerney 5955091eb3 Turn CONDITIONAL_MENU's conditions into only show/hide conditions
This leaves the decision to check/enable menu items to the main UI
conditions, and only the menu has control over showing/hiding the menu
items. Also rip out a special case for the preferenes item that isn't
needed on OSX anymore since all the main menus have been moved to
ACTION_MENUs now.
2020-08-17 23:40:02 +01:00
Jeff Young aceed2b0a4 Cleaner look for colour swatches and the undefined colour. 2020-08-17 18:31:20 +01:00
jean-pierre charras 5b365053db Fix a few I18n issues.
Especially, only ASCII7 chars can be used in messages.
Do not mark debug messages as I18n strings
2020-08-17 09:18:49 +02:00
Ian McInerney 4491f24d5e Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00:00
Ian McInerney e8b11c911e Migrate Pcbnew/footprint viewer/footprint editor to the new UI update system 2020-08-16 19:10:26 +00:00
Ian McInerney 45fb030b9b Rename and shorten the names in ACTION_CONDITIONS 2020-08-16 19:10:25 +00:00
Ian McInerney 3b05d7cddd Move more frames to the new UI condition framework
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor

This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.

Also, some IDs were converted to tools in the pagelayout editor.
2020-08-16 19:10:25 +00:00
Ian McInerney 72a1c71e07 Implement a framework to handle wxUpdateUIEvents for tool actions
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.

This commit switchs the 3d viewer and kicad project manager window
over to this system.
2020-08-16 19:10:25 +00:00
Ian McInerney d19ff3e595 Unify the UI IDs for actions between the menus and toolbars
By unifying the IDs so that an action only has one UI ID,
it will receive only one update event that will work for
all controls using the action.
2020-08-16 19:10:24 +00:00
Jon Evans 92174d414c Ensure pads and zones come up visible by default
These visibility layers didn't exist until now
2020-08-16 10:17:20 -04:00
Jon Evans 0db00046d1 Fix rendering of net colors on items 2020-08-15 18:50:44 -04:00
Jon Evans 2f604b4494 Add selection filter to footprint editor 2020-08-15 16:42:19 -04:00
Jeff Young 57c3d8e8d8 Make sure preview group gets added to view after a clear. 2020-08-15 21:13:44 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young edda024285 Fix up some Coverity and CLion warnings. 2020-08-14 12:41:20 +01:00
Jeff Young 519bc80394 Replace error reporting in DRC rule compiler. 2020-08-13 18:47:41 +01:00
Jeff Young 0b17dbd123 Fix nesting issues in the DRC rule expression code generator.
We were executing function calls multiple times because we were
processing them at a depth the traversal algorithm wasn't expecting.
2020-08-13 18:36:10 +01:00
Tomasz Wlostowski d937fadd6f Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski a5a06e3c89 libeval_compiler: general clean up of the Lemon grammar + some smart pointers + killed all memory leaks. WIP! 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 29a01e5515 libeval_compiler: wxString()-ification WIP 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 6358995ff8 EDA_TEXT: rename GetEffectiveShape() to GetEffectiveTextShape() to avoid name aliasing with BOARD_ITEM inteface 2020-08-13 14:50:59 +02:00
Jeff Young 393bb0fd83 Fix assert where geometry routine wasn't ready to handle layers.
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Jeff Young 84425f5a40 Fix crash bug from bad static_cast. 2020-08-12 22:20:07 +01:00
Qbort b41892e4da Rename class GROUP in pcbnew to PCB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5156
2020-08-12 15:36:08 +01:00
Seth Hillbrand ab58b67842 Adding triangulation viewing to AC
This adds a helper routine to visualize the quality of our
triangulation.  It also renames an excessively long variable name for
the arc editor
2020-08-12 06:22:45 -07:00
Ian McInerney 47f7c616f8 Fix Python environment variable handling
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.

Also, improve the environment variable tracing infrastructure to capture
more changes.
2020-08-12 00:14:19 +01:00
Joshua Redstone ee428876ec ADDED: Group/Ungroup function
This implements the group/ungroup functions to mark a set of EDA_ITEMs as a unit, allowing them to be moved and rotated as a unit
2020-08-11 19:37:07 +00:00
Jeff Young 9716c62e32 Performance enhancements for PCBNew scrolling and zooming.
Fixes https://gitlab.com/kicad/code/kicad/issues/5136
2020-08-10 23:43:24 +01:00
Jeff Young e1c449902d Ask user before throwing away changes to DRC Rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Jeff Young 0a6a91b5ad Convert smart quotes and dashes in reports to ASCII quotes and dashes.
Fixes https://gitlab.com/kicad/code/kicad/issues/1861
2020-08-10 23:43:24 +01:00
Ian McInerney 5684708b22 Remove shadowing linewidth member from the Cairo GAL
The base GAL has the linewidth property already, and its
accessor will only return the base version. This was causing
problems with the Cairo printing GAL, since that setter wasn't
using the base class version. Also, this removes the print-specific
setter, since the actual setting of line width shouldn't be done
there and is instead done where the drawing happens.

Fixes https://gitlab.com/kicad/code/kicad/issues/5089
2020-08-10 22:16:11 +00:00
Jeff Young 692aeff334 Fix a bunch of usages of copy ctor that really meant duplicate.
In particular, "duplicate" means "with a new KIID".

Fixes https://gitlab.com/kicad/code/kicad/issues/5127
2020-08-10 14:23:11 +01:00
Ian McInerney 265c6fa3b7 Improve color theme support in the footprint preview widget
This ensures the colors used by the status text pane in the preview
widget are the same as the canvas, so there is a seemless transition
between the two.

Additionally, remove the scrollbars from the symbol preview widget
in the place symbol dialog - they are pointless.
2020-08-10 02:29:15 +01:00
Fabien Corona 133d082cc5 Pcbnew fix arc edition 2020-08-09 23:03:31 +00:00
Jon Evans 2fc9c7233d Add color layer for schematic aux items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4825
2020-08-09 17:39:52 -04:00
Ian McInerney c458b50fd9 Ensure the environment variables are synchronized between KiCad and Python
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 19:56:12 +01:00
bjpiccioni d08bf90576 ADDED: Geographic Reannotation 2020-08-09 12:43:05 -04:00
Jon Evans 43ab43ec9e Fix a few issues with Close Project
A new empty project needs to be reopened for now
Footprint info cache write only works with a project for now
2020-08-09 11:13:50 -04:00
Jeff Young 4317881012 Improve delete-unused-layers to better handle multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5116
2020-08-09 15:39:51 +01:00
Mark Roszko c6e388db14 Implement an app progress indicator in the taskbar
ADDED: Progress indicator in the taskbar

This adds a progress indicator to the Windows and macOS taskbar
icons to display the progress of some operations.

Note, this requires wxWidgets 3.1+
2020-08-09 10:55:00 +00:00
Peter Montgomery 4d460ec073 Delete 3D cache files with GUI settable number of days
KiCad stores 3D cache files but never gets rid of any of them.
This patch adds a new function called 'CleanCacheDir()'.  Any cache
files older than the passed 'number of days' parameter are deleted.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1928
2020-08-09 10:41:45 +00:00
Jon Evans 79e40cf765 Fix a few issues with Close Projects MR
Store list of previously open projects only in kicad.json
Keep all management of open projects in SETTINGS_MANAGER

Also add kicadSettings() for convenience
2020-08-08 16:00:49 -04:00
Fabien Corona bc357dff8a Add "Close project"
Allow the user to close a project from the project manager.
Distinguish the open project from the file history.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4964
2020-08-08 18:52:14 +00:00
Jeff Young 98237e96a4 Fix doubly-inited list.
Fixes https://gitlab.com/kicad/code/kicad/issues/4921
2020-08-08 16:25:30 +01:00
Jon Evans dcc484e114 CHANGED: Library editors are now usable with no project loaded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3688
2020-08-07 18:02:34 -04:00
Jon Evans 413c2cc2c6 Don't use the schematic grid for page border in pcbnew
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5105
2020-08-07 17:12:21 -04:00
mntmn bf60482b5c OpenGL GAL: support fallback without overlay buffer
On platforms with limited framebuffer attachments, like GC7000L
driven by the open source etnaviv driver, we can still use
GPU acceleration by drawing directly to the main buffer.

EDA_DRAW_PANEL_GAL::onPaint checks if an overlay target is
available in the GAL, and if not, redraws the whole view if the
overlay target should be dirty.

Clearing of the overlay target is a no-op if there is no overlay
buffer.

Signed-off-by: Lukas F. Hartmann <lukas@mntre.com>
2020-08-07 13:27:47 +00:00
Jeff Young f244f3b24c Last issue wasn't gcc/CLang after all, but the lexer not getting built. 2020-08-06 23:16:58 +01:00
Jeff Young af6bd76dce Fix for gcc. 2020-08-06 22:42:26 +01:00
Jeff Young f27661fa39 Be more flexible with user input; more multibyte safety. 2020-08-06 19:38:06 +01:00
Jeff Young 0e9714fdba Simplify fp-info-cache escaping mechanism.
Fixes https://gitlab.com/kicad/code/kicad/issues/4969
2020-08-04 23:54:12 +01:00
Jeff Young 3cf5db3ce5 Allow cancelling of zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/5035
2020-08-04 19:53:35 +01:00
Ian McInerney acc3217a95 Renormalize line endings and enforce normalization for all contributors 2020-08-03 23:15:10 +01:00
jean-pierre charras df4226f896 Settings management: try to fix full filename issues when using non ASCII7 chars.
The fix convert all std::string storing a path to wxString (unicode support)
wxString were already used at many place to store paths, but not all.
For internal calculations mixing char strings and wide char strings is a recipe
for bug: any missing conversion between UTF8 and wxString breaks paths.
2020-08-02 21:31:03 +02:00
Jeff Young 07ab97a58b Read and update colour settings when changed in prefs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5046
2020-08-02 18:43:18 +01:00
Jon Evans aae40148dc Switch to ordered_json and enable ignore_comments parser option 2020-08-02 13:11:16 +00:00
Jeff Young d586495c0a Preview fp edges & text while dragging in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-01 15:40:34 +01:00
Jeff Young 6e4d4401ae Make sure to translate UTF8 std::string to wchars for wxString.
Fixes https://gitlab.com/kicad/code/kicad/issues/5024
2020-07-31 14:48:45 +01:00
Jeff Young 577c1be391 Report all DRC rule errors, not just the first. 2020-07-30 14:27:42 +01:00
Jeff Young ebef7c03db Add simplified HTML reporter window. 2020-07-30 14:27:42 +01:00
Seth Hillbrand 0a4ce183a4 ADDED: polygon newlines every point
By default KiCad will now print each polygon point on its own line.
This adds to the vertical distance for large polygons but makes revision
control much cleaner as single point addition to a polygon does not
propagate to a diff over the full polygon.

Users/developers who want to save the files using the 4-points per line
have the ADVANCED_CONFIG setting 'CompactSave' which will provide the
original save method
2020-07-30 01:18:44 +00:00
Jon Evans b0c6a0f9ef Allow sheet colors to remain unspecified if not manually set
This way, when the user changes their color theme, any sheets
that did not have a specific color set will change with the theme.

Also add a button to clear color overrides from a sheet, because
any schematics that have been saved before this change will have
the colors set to something other than UNSPECIFIED.
2020-07-29 21:16:07 -04:00
Tomasz Wlostowski ca17cada2a ENUM_MAP: fix value used as index (should be use as key) bug causing incorrect String<>Enum mappings 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski fe4695719d libeval_compiler: post-rebase fixes 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski 3c80b98d1c libeval_compiler: CONTEXT runs the UCODE now (thread-safe solution), fixed some memory leaks 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 89a953e039 Migrated GetEffectiveShape(s) to SHAPE_COMPOUND 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 832a8c5bf7 pcbnew: implement SHAPE_COMPOUND-based GetEffectiveShape() 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 7dbd8ef802 EDA_TEXT: implement GetEffectiveShape() 2020-07-29 23:14:03 +02:00
Jeff Young 0fecb5f277 Be more explicit about string/character conversions.
This *may* fix the bug where a layer name isn't displayed correctly
in the error dialog.  But probably not.
2020-07-28 20:44:40 +01:00
Jeff Young b74e125264 Read/write schematic netclass properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/4990
2020-07-27 23:10:46 +01:00
Mark Roszko 8324cb30b7 Save the wxDisplay index to set the position of windows correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4338
2020-07-27 02:53:56 +00:00
jean-pierre charras ed79ef8feb PDF plotter: better handling of non ASCII7 (unicode 16) chars.
Note also the PS plotter handle poorly these non ASCII chars.

Fixes #4957
https://gitlab.com/kicad/code/kicad/issues/4957
2020-07-26 17:59:02 +02:00
Seth Hillbrand 6900f04ee0 Change Zone extra clearance magic number to AC
Rather than keeping a magic number in the code, we set the default in
the advanced config setting and allow users/developers to modify it.
2020-07-26 07:20:24 -07:00
Jeff Young 552dde8976 Fix return value going out of scope.
(From Coverity report.)
2020-07-26 13:41:43 +01:00
Simon Richter 95c2b261e8 Don't mandate ownership semantics in API
This API doesn't transfer ownership, so no smart pointers are required --
this just needlessly tightens requirements on the user of the interface.

(Fixes five instances of MSVC C26410 warning)
2020-07-26 02:45:27 +00:00
Seth Hillbrand 0a5f11fb37 Keep item ordering as much as possible
The ordering goes first by type and then by uuid.  In the case of
DRAWSEGMENT and EDGE_MODULE, we also sort by shape type before UUID.

Fixes https://gitlab.com/kicad/code/kicad/issues/4068
2020-07-25 12:56:19 -07:00
Jeff Young bf445c1a95 Performance enhancements.
1) cache pad polygon outlines
   huge improvement in connectivity performance and a decent
   improvement in DRC performance
2) don't pre-allocate CONTEXT stack
   significant improvement in DRC rule performance
2) don't keep re-encoding strings
   decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young f97c50bfde Give excluded DRC items their own layer.
(And fix a bug with the new mulit-layer zones and rule-based keepouts
at the same time which prevented me from testing it.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4954
2020-07-24 01:28:25 +01:00
Jeff Young 6529e339a9 Don't store context in the uCode. (It's not thread-safe.)
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young ac6ceb84bf Fix bug which would throw away all enum values after a Get().
(It was allocating a stack variable copy of the singleton, which
when freed cleared the singleton's m_choices.)

https://forum.kicad.info/t/need-some-guinea-pigs-for-a-rule-based-drc-prototype/22955/85
2020-07-23 16:41:58 +01:00
Jeff Young f2812773d4 Better handling of undefined values in Rule expressions.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
jean-pierre charras c254b331f3 Pcbnew: Activate pad fabrication property in pad properties dialog.
It was previously an option of advanced config since 6 months.
It is now not optional.
2020-07-23 14:33:24 +02:00
Tomasz Wlostowski 151b4e4e5e libcontext: clean up own's shit when coroutine call is over (MSVC only) 2020-07-22 16:57:54 +02:00
Jeff Young a6b6084a60 Add preflighting for DRC rule function calls. 2020-07-22 14:33:32 +01:00
Jeff Young fd647a1fa9 Code completion hookup to property manager. 2020-07-21 23:43:10 +01:00
Fabien Corona a1437f4a95 Eeschema : Add A5 sheet size 2020-07-21 00:00:36 +00:00
Jeff Young 1790c536ef Allow user layer names to be used in DRC rules.
I imagine this will also fix the property inspector, once it
gets merged.
2020-07-20 23:28:54 +01:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Mark Roszko 3b727b5d16 Make preference groups not selectable 2020-07-20 13:45:46 +00:00
Seth Hillbrand aa788b452e Adding Fabmaster extensions 2020-07-19 20:46:14 -07:00
Seth Hillbrand 2d0e3b7e0d Add an implementation of string splitting 2020-07-18 13:03:39 -07:00
Jeff Young bcb29b6bf8 Fix security issue (buffer overrun). 2020-07-18 11:44:12 +01:00
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jeff Young 33480ecad1 Show all symbol libraries by default.
Also fixes an issue where the plugin wasn't getting reset if the
library type was changed.
2020-07-17 18:33:14 +01:00
Jeff Young 944c9eac7c Allow Update Schematic from PCB to re-link based on refdes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00
Ian McInerney af729d578f Unify settings reset buttons into one location 2020-07-16 00:08:16 +01:00
jean-pierre charras 9f20c61fa7 Remove creation on the fly of a wxPaintEvent instance (fix previous commit). 2020-07-15 14:56:35 +02:00
jean-pierre charras 6366aa3ede Remove creation on the fly of a wxPaintEvent instance (final step).
This is not allowed in 3.1.4 wxWidgets.
2020-07-15 12:58:43 +02:00
Jeff Young e9da02e2d5 Only reserve hotkeys for focused textCtrls that are editabled.
Otherwise just send Ctrl-C to the disabled control, and everything
else to the tool framework.

Fixes https://gitlab.com/kicad/code/kicad/issues/4801
2020-07-14 13:30:43 +01:00
Seth Hillbrand af501a7e4e Revert "Fix compile issue on OSX."
This reverts commit 7cbaeae265.
2020-07-13 20:19:09 -07:00
Seth Hillbrand 90e927f55a Revert "Protect SetDoubleBuffered against wx3.1"
This reverts commit 30eef410a9.
2020-07-13 20:19:04 -07:00
jean-pierre charras d34f8fd4b5 Prepare removing creation of a wxPaintEvent instance, not allowed in 3.1.4 wxWidgets 2020-07-13 19:53:07 +02:00
Jeff Young 1cd2a51db2 Make undo/redo lists protected. 2020-07-13 15:53:36 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

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

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

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Seth Hillbrand 30eef410a9 Protect SetDoubleBuffered against wx3.1
In 3.0, SetDoubleBuffered() is defined only under MSW and Linux.  In
3.1, they change the routine to be a virtual function and so we need to
protect against redefining an existing function (Thanks Ian for pointing
this out!)
2020-07-12 20:03:50 -07:00
Seth Hillbrand 9f09c3872f Ensure file reads always use the C-locale variant
Str2Double assumes current locale.  We usually switch the locale when
reading files but we should be using the function that explicitly gets
the C-locale conversion.
2020-07-12 20:03:50 -07:00
Jon Evans 5d118b0700 More visibility settings infrastructure
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings

Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Jeff Young 7cbaeae265 Fix compile issue on OSX.
(OSX is always double-buffered so wxWidgets left that method out
of the OSX impl.  Might have been nicer if they had just no-op'ed
it.)
2020-07-11 21:33:56 +01:00
Jeff Young e325d2e18f Allow Net Inspector to create, rename and delete nets.
ADDED: create/edit/delete nets in PCBnew Net Inspector
ADDED: update from PCB now allows updating of changed nets

Fixes https://gitlab.com/kicad/code/kicad/issues/1996
2020-07-11 21:19:49 +01:00
Jon Evans 72b08f2b18 ADDED: Hide ratsnest for specific nets
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.

Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
2020-07-10 21:06:17 -04:00
Seth Hillbrand 95bfb64d48 Update templating for hash values
This cleans the template for hash_combine to provide a single signature
for basic hash_combine, recursing to a null function.
2020-07-10 10:03:29 -07:00
Seth Hillbrand 7201e9d7eb pcbnew: adjust component hash for GenCAD export
The previous hash was not unique for changes in integer/boolean values.
Generic hash_combine routines provide decent coverage for limited extra
cycles.
2020-07-09 17:40:30 -07:00
Ian McInerney af24a5d5a7 Properly dismiss the grid combobox editor when it loses focus
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/4617
2020-07-09 20:37:08 +01:00
Jon Evans b1b9cef5fb Full-project automatic backup system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4763
2020-07-09 13:55:19 +00:00
Jon Evans afd432e687 Infrastructure for net hiding
LoadProjectSettings changed to take place after the board
has been loaded so that board-specific project settings can
be applied (such as net visibility and color overrides)
2020-07-08 21:59:34 -04:00
Jeff Young 741481591e NetClass settings for Eeschema.
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.

Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Jon Evans 3dd2dc89ad Fix default values for color theme editor
At the time of creating a copy, the defaultColors map
is not initialized, so needs to be initialized from the
copy constructor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4841
2020-07-08 12:19:10 -04:00
Jon Evans 961fbadd23 Initial infrastructure for net/netclass colors in board 2020-07-07 22:21:45 -04:00
Ian McInerney 0f0e845d74 Add parsing for centimeters into the numeric evaluator
ADDED: Allow cm as a unit in text field expressions

Fixes https://gitlab.com/kicad/code/kicad/issues/4797
2020-07-07 23:12:17 +01:00
Seth Hillbrand 7cea4b23f1 ADDED: Expand selection in context menu
Break out the context menu with heuristically limited choices being
appended to the main list rather than re-selecting

Fixes https://gitlab.com/kicad/code/kicad/issues/4799
2020-07-07 14:18:35 -07:00
jean-pierre charras fbc3ba8c04 Ensure GAL::SetGridSize( const VECTOR2D& aGridSize ) use non null sizes
aGridSize.x or aGridSize.y can be null if the config file has stored
0 as size.
This is illegal and crashed Kicad.
The min legal value is 1.0 in internal units
2020-07-07 20:51:19 +02:00
Jeff Young e66523586b Add Assign Netclass... to context menu.
ADDED Assign Netclass feature to EEschema.

Netclass assignments also now shown in status bar.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
Jon Evans a3655225cd Save selection filter state in project local settings 2020-07-06 21:53:12 -04:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jon Evans db4502e2ae Add copy ctor for BOARD_DESIGN_SETTINGS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4817
2020-07-06 12:45:57 -04:00
Seth Hillbrand 98664ee714 Add missing includes 2020-07-06 06:17:37 -07:00
Seth Hillbrand 8b71abd3fb Remove virtual from GAL functions
Functions that are not overridden or intended to be so
should not have virtual set
2020-07-06 06:13:31 -07:00
Tomasz Wlostowski 49c37014f7 Updated copyright headers in expression evaluator code 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 9d0f5c7f94 PROGRESS_REPORTER: implement SetCurrentProgress() method 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 3268f98fd7 libeval_compiler: support for method calls (e.g. item.onlayer('layer') ) 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 7e8e02072e ENUM_MAP: support reverse (string-to-enum) mapping 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski aaa91655aa libeval_compiler: integrated in common/ 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 4ffb82b4e3 PROPERTY_MANAGER: added GetAllClasses and GetMatchingClasses methods 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski d2c9ccd3fe INSPECTABLE: minor bugfix 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski c1d5394e46 properties: post-rebase fixes 2020-07-05 22:44:38 +02:00
Maciej Suminski f084a86601 Properties replacement method
Adds a possibility to replace properties inherited from base types with
a more specific ones. For example, such properties may have:

- different meaning which should be reflected in property name
  (e.g. TRACK::{G,S}etWidth() sets actual track width, but
  VIA::{G,S}etWidth() modifies the diameter)

- different set of possible values (e.g. BOARD_CONNECTED_ITEM::SetLayer()
  should accept any copper layer, but MODULE::SetLayer() works only with
  F.Cu and B.Cu)
2020-07-05 22:44:38 +02:00
Maciej Suminski a289056a9e Properties meta-data for pcbnew classes 2020-07-05 22:44:38 +02:00
Maciej Suminski cbd5004fd4 Properties (introspection)
Introduces classes:
- INSPECTED: base class for types taking advantage of
  generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
2020-07-05 22:44:38 +02:00
Maciej Suminski 89698a727b Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
Jon Evans 6eca886292 Fix some UTF8 issues with project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4808
2020-07-05 12:26:14 -04:00
Qbort f3f17401dc Fix OPENGL_GAL initialization sequence
- New public static function OPENGL_GAL::CheckFeatures() gets called in EDA_DRAW_PANEL_GAL::SwitchBackend() before switching to OPENGL_GAL
- Moved all OpenGL feature checks from OPENGL_GAL constructor to OPENGL_GAL::init()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4714
2020-07-04 10:54:30 +00:00
Jon Evans a02a4ff179 Clean up worksheet draw items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3882
2020-07-03 23:06:37 -04:00
Jon Evans d143e14694 Fix memory leaks in color theme editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4794
2020-07-03 22:34:41 -04:00
Jon Evans 3d7610d6b9 Hide PNS debug graphics behind an AC key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4061
2020-07-03 19:33:36 -04:00
Jon Evans a9e97848dd Fix use after free on BOARD_DESIGN_SETTINGS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4792
2020-07-03 19:13:06 -04:00
Seth Hillbrand 2f01dedb69 Modify glx sync to be Linux only.
Mac glxew seems to require X11, which we don't use.
2020-07-03 11:17:56 -07:00
jean-pierre charras 286c36b7da gl_utils.h: fix compil issue on Windows
__WINDOWS__ is defined in wxWidgets.
the right preprocessor symbol is _WIN32 for Windows 32/64 bits
2020-07-03 17:12:36 +02:00
Thomas Pointhuber 7ba6a77c94 Improve arc geometry manager to choose the direction which makes more sense
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.
2020-07-03 15:05:17 +00:00
Seth Hillbrand a210fd570f Set VSYNC to adaptive (if available)
Swap syncs can limit the redraw rate as the screen waits for previously
issued syncs.  Setting this to -1 allows for adaptive swapping
(resorting to unsynced if it falls behind) if it is supported by the
card but will fall back to unsynced (0) if the adaptive is not
supported.

Fixes https://gitlab.com/kicad/code/kicad/issues/4226
2020-07-03 13:27:48 +00:00
Jon Evans 4dbbe1cf68 Project settings fixes from review
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
2020-07-02 22:08:54 -04:00
Jon Evans fe5959b625 Remove the schematic and board backup file system
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users.  The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
2020-07-02 22:08:54 -04:00
Jon Evans b592a4169f Update project template system for new format 2020-07-02 22:08:54 -04:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans 0e2f9cb1bd Migrate CvPcb project parameters 2020-07-02 22:08:54 -04:00
Jon Evans a4fadfcdf2 Begin moving project file load to new system 2020-07-02 22:08:54 -04:00
Jon Evans a5a19076fd Move PROJECT storage to SETTINGS_MANAGER 2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Seth Hillbrand e320a3f112 Add missing include
Also prefer std::string over wxString where possible
2020-07-01 15:40:15 -07:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jeff Young 25c5c35176 Fix compile error on Linux. 2020-06-30 19:15:11 +01:00
Jeff Young 40a72d9530 Add SH_RECT handling to 3D shape conversion.
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.

Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
Jon Evans 44f3cdb31e Fix a few issues with zone islands 2020-06-29 12:16:37 -04:00
Jon Evans 7532cf4ab0 Add support for data type to UNIT_BINDER 2020-06-28 08:52:37 -04:00
jean-pierre charras 67f46a0bb1 Gerber plotter: Better object attributes handling when plotting a zone
- Clear object attributes before and after plotting a zone.
It avoid using previously defined object attributes when plotting the next zone,
and using therefore incorrect attributes.
- Add aperture attribute to filled zone solid polygons (regions in Gerber)
2020-06-28 12:29:36 +02:00
Jon Evans bd19c580f4 Add configuration for cross-probing behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2317
2020-06-27 22:48:48 -04:00
Jeff Young 32c3ea4edd Flags cleanup.
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).

Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.

Remove obsolete HIGHLIGHT infrastructure (we now use selection).

Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Jeff Young da2b7071b4 WYSISYG custom pad editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153

Fixes https://gitlab.com/kicad/code/kicad/issues/2305
2020-06-27 14:37:01 +01:00
Ian McInerney fb10406e67 Add right-click context menus for toolbar items 2020-06-26 21:29:03 +00:00
Ian McInerney 52856a8ce4 Move scaled toolbar separator into ACTION_TOOLBAR
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00
Wayne Stambaugh 2078e629c5 Eeschema: allow editing of junction properties diameter and color.
Add missing plot and print changes for the new bus entry properties.

ADDED: Junction properties diameter and color can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4593
2020-06-24 13:36:17 -04:00
Jeff Young 5ee806c3a3 The dispatch-behind & whitelist stuff got broken again, so I've
retired them in favour of a much dumber hack that special-cases
only ctrl-U for units switch.
2020-06-24 12:22:42 +01:00
Jeff Young 18ab3c4714 Fix missing user grid in COMMON_TOOLS.
Fixes https://gitlab.com/kicad/code/kicad/issues/4702
2020-06-23 11:17:15 +01:00
Jon Evans 713cd4a47a Point editor: show dragged points with a highlight
Take points editor colors from color theme

Also fix an issue where the edited object sometimes didn't
update when a point is dragged.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4600
2020-06-21 14:43:41 -04:00
Ian McInerney 96a5a96037 Fix GTK window position when closed maximized
GTK only sends one maximize event, and it happens after the
window is maximized, so we shouldn't check for not being maximized.
2020-06-19 20:13:03 +01:00
Ian McInerney 5b3d947b7e Fix initialization order fiasco with colors
The legacy color refs are needed by the COLOR4D constructor
when constructing a static variable, so they can't be static
themselves.
2020-06-19 17:05:18 +01:00
Ian McInerney 5649558cff Move DPI_SCALING into the GAL from common
It should be owned by the GAL, since it is used
with the OpenGL canvas infrastructure.
2020-06-19 17:02:46 +01:00
Jeff Young a1332d76fe Remove SHAPE_EDITOR frame types before we forget about them.
They may go back at some point, or they may not....
2020-06-19 14:10:41 +01:00
Ian McInerney fe1e835471 Cleanup some unused files 2020-06-19 12:34:15 +01:00
Jon Evans e91b9f6dfb Rip out the unused leftovers of the old color system 2020-06-18 22:32:14 -04:00
Jeff Young cae493fe65 More infrastructure work for shape editor. 2020-06-18 15:38:01 +01:00
Jeff Young ee9d8fcd15 Collapse Pcbnew & ModEdit display and edit settings.
(Prep work for reusing them with a custom shape editor.)
2020-06-18 15:38:01 +01:00
Jeff Young 754f958be2 Attempt to fix duplicate ID issue on MSW. 2020-06-17 18:44:39 +01:00
Jeff Young a7703d1207 Cleanup Graphics to parallel Cleanup Tracks & Vias.
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young fc44506fe1 Give up on enforcing non-defined-internal-units.
It results in trade-offs in packaging and/or conidtional compilation
which are worse than the disease.
2020-06-13 22:44:16 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
jean-pierre charras 27c80e8a2e Solder mask clearance default value: set default to 0, taking advice from
both Ucamco and Eurocircuits.
Update message in plot dialog about best solder mask clearance value.
Show warning in plot dialog if these values are no 0.
2020-06-07 11:10:28 +02:00
Ian McInerney 33a840085d Improve comment describing how we bludgen wx 2020-06-07 00:00:31 +01:00
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Ian McInerney 4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Ian McInerney ab83c86210 Remove the platform-specific GetBackendScalingFactor from HIDPI_GL_CANVAS
The scaling factor stored inside the canvas is created by a DPI_SCALING
helper, which will call the platform-specific functions if no user scaling
is specified. This change only affects OSX and Retina displays, so this
now also allows custom scaling to be used on OSX if desired (although it
shouldn't be needed, since wx has detection for it in 3.0.4).
2020-06-05 00:15:54 +00:00
Jeff Young 0ddf53397f Make sure CvPcb gets its Cancel button fixed up.
It's no longer a DIALOG_SHIM so it can't depend on its fixup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4611
2020-06-04 22:35:01 +01:00
Johannes Pfister 8e8979e317 Fixed a memory leak in CONDITIONAL_MENU
CONDITIONAL_MENU::ENTRY now owns the wxItem object.
2020-06-04 19:08:59 +00:00
Jeff Young f4d8c30f9a Tighten DRC epsilon value until we decide what to do about it. 2020-06-04 18:28:48 +01:00
Ian McInerney d46f9a5273 Give the 3D viewer an infobar & Infobar upgrades
ADDED: Infobar warning in 3d viewer for board outline issues
2020-06-04 00:13:27 +01:00
Jon Evans daad2824c5 Add ability to skip JSON writes if the params aren't modified 2020-05-30 18:07:24 -04:00
Jeff Young 0741bbb1b9 Move autocomplete to the remove filtered items paradigm.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-30 20:09:09 +01:00
Jeff Young 449c90a0ae Some more work on getting wxWidgets to stop stealing textEntry keys.
Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-05-30 12:32:33 +01:00
Jeff Young a6eaa3257a Autocomplete for page layout editor text items. 2020-05-30 10:22:50 +01:00
Wayne Stambaugh b624c7090a Deprecate saving legacy schematic and symbol library file formats.
REMOVED: The ability to save schematics in the legacy file format.
2020-05-29 12:43:00 +00:00
Jeff Young 9f2be3714f Add unresolved variable testing for worksheet items. 2020-05-28 17:36:22 +01:00
Wayne Stambaugh 918197554b Add missing header to fix mingw build error on windows. 2020-05-28 08:44:28 -04:00
Jeff Young 8b084c373e Autocomplete for text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-27 23:29:51 +01:00
Jon Evans 695cdbbde8 Move bug reporting to COMMON_CONTROL; add to Help menu
Also make a shorter version of the version info string
and some other shortening edits to the issue template
to fix occasional 500 errors thrown by Cloudflare due
to excessively long URLs

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3953
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4272
2020-05-26 21:18:32 -04:00
Jeff Young d99febba6c Treat sketch mode module items and board items the same. 2020-05-26 23:21:38 +01:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Jeff Young 416d82727f Redo DRC rules to get ready for new system. 2020-05-25 22:51:47 +01:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00
Ian McInerney 4ecf99e7c8 Give the footprint viewer a toolbar and remove the options dialog
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)

This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.

Fixes https://gitlab.com/kicad/code/kicad/issues/2205
2020-05-24 11:58:33 +01:00
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Jeff Young 84224509b9 A more aggressive fix for #4515.
Fixes https://gitlab.com/kicad/code/kicad/issues/4515
2020-05-22 22:52:22 +01:00
Stefan 7e6b2211e0 Add Assembly pcbview to pcb_layer_widget 2020-05-22 20:40:53 +00:00
Jeff Young a5b53a623d Update status bar with clearance & rule sources. 2020-05-21 21:26:30 +01:00
Ian McInerney fca7ade81f Move to the AUI version of the infobar
The sizer-based version had issues with the event processing
inside the GAL panel on Windows systems.

Fixes https://gitlab.com/kicad/code/kicad/issues/4501
2020-05-21 18:22:56 +01:00
Jon Evans 7c7b7f41da Move SCH_SCREEN project access to SCHEMATIC
SCH_SCREEN no longer needs to be a KIWAY_HOLDER
2020-05-20 22:27:48 -04:00
Ian McInerney 73a1ce3e84 Move eeschema find notification to the infobar and improve the infobar widget
* Move it to a panel along with the canvas to have a better UI
* Allow the infobar to automatically close after a set time

CHANGED: The eeschema find notifications now use the infobar instead of
a popup window
2020-05-20 02:31:47 +01:00
Ian McInerney 2bc57ade28 Cleanup parentage inside the draw panels 2020-05-20 02:23:46 +01:00
Jon Evans f4d7c323f5 Coverity fixes 2020-05-18 22:58:28 -04:00
Ian McInerney a2f027e063 Add an infobar widget to display information above the canvas
This widget allows for non-intrusive display of text
above the editing canvas. Currently, this is used
for displaying the read only status of the files.
2020-05-19 00:46:33 +01:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Ian McInerney e662e33104 Store the current filename in the history on close 2020-05-17 00:12:49 +01:00
Ian McInerney 613c020920 Move the file history into the frames 2020-05-17 00:12:49 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
Jon Evans d599648ec7 ADDED: Enable color themes for schematic printing 2020-05-16 13:19:43 -04:00
Jeff Young d3f017d825 DRC rules parser and engine.
Fixes https://gitlab.com/kicad/code/kicad/issues/2182

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1965
2020-05-16 15:53:05 +01:00
jean-pierre charras 3f8d11144e Avoid crash when reading a json config file having an unexpected parameter value.
Now print the json path in debug mode instead of crashing.
In release mode, skip the parameter (the default value is still used)

Fixes #4451
https://gitlab.com/kicad/code/kicad/issues/4451
2020-05-15 15:02:40 +02:00
Jeff Young 4a1ee40058 Pretty print bus definitions to the menus. 2020-05-13 16:26:53 +01:00
Jeff Young 301ac3461c Fix some more pen width issues from global removal.
Fixes https://gitlab.com/kicad/code/kicad/issues/4408
2020-05-12 15:20:17 +01:00
Jeff Young 74ee143d45 Add via annulus minimum. 2020-05-11 22:56:09 +01:00
Simon Richter 632494cba7 Add missing includes
A few more instances of missing <algorithm> for std::max
2020-05-10 00:24:11 +02:00
Jeff Young 3c3984a6fc Generalize default footprint fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2289
2020-05-08 23:30:33 +01:00
Jon Evans 960ce4aa67 Use footprint color scheme for CvPcb footprint viewer panel
Fixes #4375
2020-05-08 17:05:29 -04:00
Jeff Young 001a50bf14 Moved PANEL_COLOR_SETTINGS from buttons to swatches.
This allows us to correctly display non-100%-opacity colors (ie:
over the correct background color).
2020-05-06 19:02:21 +01:00
Ian McInerney c43122a45f Get the undecorated window size on GTK when saving the window config
The window decorations introduce an offset to our window size, since
they are not used when restoring the window size at startup they are
added by the window manager again.

Fixes https://gitlab.com/kicad/code/kicad/issues/4278
2020-05-06 14:53:15 +01:00
Jon Evans 9916f24fab Split out footprint editor color settings
Migrate COLOR_SETTINGS 0->1 to remove fpedit section
Migrate FOOTPRINT_EDITOR_SETTINGS 0->1 to use new theme if created
Remove COLOR_CONTEXT that is no longer needed
2020-05-05 21:46:00 -04:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
Jon Evans d00df0169f A few tweaks to settings migration infrastructure 2020-05-05 21:46:00 -04:00
Jeff Young 67bccaf465 Make indeterminate control states clearer for the user.
Fixes https://gitlab.com/kicad/code/kicad/issues/4313
2020-05-05 20:26:51 +01:00
Jeff Young e0da677d4d Add min clearance to DRC; rename Min Via Drill to Min Through Hole.
Also fixes a crash bug when ignoring a DRC violoation with multiple
markers.

Fixes https://gitlab.com/kicad/code/kicad/issues/2528
2020-05-04 22:08:36 +01:00
Wayne Stambaugh 169f63a6c0 Eeschema: make schematic sharing truly safe across all designs.
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects.  It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic).  This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet.  This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references.  It also allows the root schematic from one project
to be uses as a sub-sheet in another project.

When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs.  This is done to ensure there
are no sheet path instance clashes between projects.  That being said,
there are no checks for this.  It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
2020-05-04 12:40:03 +00:00
Jeff Young bdf9491682 Re-factor the event whitelist stuff so that it doesn't promise what it can't deliver. 2020-05-03 20:56:32 +01:00
Jeff Young 56946f4db1 Fix pad name increment to use last edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/1882
2020-05-03 08:59:51 +01:00
Jeff Young 199bb2ffb0 Add hittesting for worksheets in Pcbnew and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/4282
2020-05-03 00:07:38 +01:00
Jeff Young 73eda91ec7 Allow some events to run behind a modal dialog.
Right now this is just unit switching.

Fixes https://gitlab.com/kicad/code/kicad/issues/2344
2020-05-02 14:37:24 +01:00
Jeff Young 10614a9ebc Implement changes for Sketch Pads to Fab Layers.
Includes adding Fab Layers to default text & graphic settings.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/2274
2020-05-01 18:49:42 +01:00
Jeff Young 874f13e29e Fix some issues with rotated oval pads. 2020-05-01 18:49:42 +01:00
jean-pierre charras 687c2f3e82 eeschema: fix a readability issue for small texts.
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
2020-04-30 09:38:23 +02:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Wayne Stambaugh fa57c8a570 Eeschema: fix sheet bug in schematic editor drawing tool.
SCH_SHEET objects can only have another SCH_SHEET object as a parent
or nullptr for the root sheet so overload EDA_ITEM::SetParent() to
prevent the parent from being set to another type of object and add
some checks to the root sheet code just in case someone gets clever
and attempts to bypass the overloaded SetParent() call.
2020-04-26 14:27:51 -04:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young 2fb2eac4d5 Performance enhancements. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jon Evans 2d95270a31 Add color theme settings to pcbnew 2020-04-23 21:55:29 -04:00
Jon Evans f7ebf2af5e Add separate color setting for bus junctions
Fix plotting and printing to use bus color when
connectivity detects that the junction is on a bus.

Fixes #4098
2020-04-22 21:55:48 -04:00
Jeff Young 5bc6ad9786 Make UNIT_BINDER sensitive to parent frame user unit changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4243
2020-04-22 20:45:45 +01:00
Jeff Young fbd68722b2 Fix a couple of problems with text stroke thickness. 2020-04-21 21:17:59 +01:00
Oleg Endo 2f1d23312f add BOARD_CHANGED and UNITS_CHANGED events 2020-04-21 13:23:56 +00:00
jean-pierre charras 6d16762df9 Better python scripting compatibility. 2020-04-21 12:46:22 +02:00
Johannes Pfister e5042a46ba Add ability to set SVG plot units and precision
ADDED: Ability to set SVG to metric or imperial units
and made it possible to change the size of a step
2020-04-20 22:02:03 +00:00
Ian McInerney a23747c640 Cleanup the menu processing in the pcbnew layer widget 2020-04-20 22:43:55 +01:00
Jeff Young 7f1b409305 Remove dead legacy print code. 2020-04-20 17:03:38 +01:00
Jon Evans b802a3e776 Add command-line option to generate netlist and exit 2020-04-19 19:13:24 -04:00
Ian McInerney e528769637 Move TOOLS_HOLDER into tools/ folder
Also clean up some compiler warnings
2020-04-19 01:51:49 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young d7d1cb6f78 A bunch of fixes to Eeschema Find/Replace. 2020-04-18 14:43:08 +01:00
Ian McInerney 3b67e3d0a4 Rewrite window positioning logic
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.

CHANGED: Window position on startup should be preserved more
2020-04-18 00:47:38 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Simon Richter 99c1d7cf96 Add noexcept to some functions in the 3d viewer. 2020-04-16 16:11:21 +00:00
jean-pierre charras 04ea20dd44 Eeschema, SCH_PAINTER: fix max text thickness issue, to have small texts readable. 2020-04-14 11:08:42 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +01:00
Jeff Young c4994eee7b Fix a pair of bugs in the new highlight net logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/4180
2020-04-11 13:02:18 +01:00
Jeff Young b067e441c7 Show/hide sheet colors when flipping override flag. 2020-04-10 00:35:17 +01:00
Jeff Young f4e22a9264 Add ability to override individual item colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/4167
2020-04-09 17:17:27 +01:00
Jeff Young 317e98b344 Simplify user model for editing color themes. 2020-04-08 22:34:56 +01:00
Jeff Young 6aaee01f1c Generalize fill parsing and add support for sheet background R/W.
Also fixes a bug in colour parsing (the alpha channel is a float).
2020-04-07 17:29:58 +01:00
Jeff Young aba0fa7bf8 Allow cross-referencing text substitutions. 2020-04-07 17:29:58 +01:00
Jeff Young cc9ac37a0e Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
Ian McInerney 4ff61318af Push pcbnew grid visibility storage into EDA_DRAW_FRAME
Fixes https://gitlab.com/kicad/code/kicad/issues/4154
2020-04-05 18:49:10 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
Jeff Young 78dfbca9a3 Save pre-eval values for Move Exactly dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/4088
2020-04-03 21:47:47 +01:00
Jon Evans 23c1baae8e Defer image surface destruction until next paint
Fixes #4043

(cherry picked from commit dbf786e456f2792476791caf9dadfeb43e9ab383)
2020-04-02 14:36:57 -04:00
jean-pierre charras 161b73e55b Enable storing pin function (pin name) in pads.
This is useful in board routing.
It is plotted in pad attribute TO.P in Gerber files.
2020-04-02 20:14:45 +02:00
Jeff Young 20c00cbb21 Finish off "busses" -> "buses".
Fixes https://gitlab.com/kicad/code/kicad/issues/4144
2020-04-02 18:27:05 +01:00
Jeff Young 811968716c Add OSX layout hack to PAGED_DIALOG for preferences. 2020-04-02 14:01:30 +01:00
Jeff Young 4966ab802e Support single-click colour editing in dialogs. 2020-04-02 14:01:30 +01:00
Jeff Young 3047cf5419 Fix Linux compile issue. 2020-03-30 17:35:11 +01:00
Jeff Young a1d62e0622 Improve some comments. 2020-03-30 14:15:59 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00