Commit Graph

2079 Commits

Author SHA1 Message Date
Jeff Young f6f31b7654 Get rid of save warning after Footprint Editor Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/8084
2021-04-01 11:17:24 +01:00
Roberto Fernandez Bautista 7077e59395 Make moving pads independent of footprint much harder with new setting
It is still possible to move a pad independent of footprint through
the pad properties dialog. This is a much more conscious decision
than using the move tools.

ADDED: "Allow free pads" preference setting in pcbnew, default to off.
When enabled, allows moving unlocked pads independent of the footprint
(i.e. previous behaviour). When disabled (default), any attempt to move
a pad will move the parent footprint instead.

REMOVED: "Lock pads of newly added footprints" preference setting in
pcbnew. (Pad lock state is now loaded from the footprint definition)

CHANGED: There are now only two possible lock states for a footprint:
locked and unlocked. The lock state of the pads in the footprint is
now independent of the footprint lock state.

Also fixed a latent bug that would allow a pad to be moved when the
parent footprint was locked (see m_selectionTool->RequestSelection
lambdas in edit_tool.cpp)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7739
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
Wayne Stambaugh 38c849bde7 Pcbnew: load write board netlist to file tool action dynamically.
Loading this advanced configuration option statically will cause it to
show up in the hotkey list even when the option is disabled. Creating
the tool action at run time resolves this issue.
2021-03-29 09:04:55 -04:00
Jeff Young f2e68e68d0 Add "Hide Tree" context menu options when tree has no selection.
Also cleans up some other code to be more consistent between symbol
editor and footprint editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/8052
2021-03-29 12:02:00 +01: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
Ian McInerney 42c6af4bd8 Cleanup ACTION_MENU creation in some places
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
2021-03-27 19:16:58 +00:00
Ian McInerney 9535153f9e Move the import graphics menu item to the action 2021-03-27 19:04:16 +00: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
Jeff Young 3279e295ac Don't start filling zones with possibly stale caches.
Fixes https://gitlab.com/kicad/code/kicad/issues/8014
2021-03-25 17:20:08 +00:00
jean-pierre charras bbd7b4ca8c Eeschema, selection tool: uniformize the cursor shape and the actual modifiers.
SHIFT, CTRL, ALT modifier keys were handled in 2 different codes, one for
the selection tool and another to modify the mouse cursor shape, with 2
different configs.
Now the modifiers are managed from only one function.
Pcbnew: group also SHIFT, CTRL, ALT modifier keys management to a specific function.
Fixes #8021
https://gitlab.com/kicad/code/kicad/issues/8021
2021-03-25 10:28:20 +01: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
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
Jonathan Haas a677998f47 Don't select new items after cancelling move following item duplication
Fixes https://gitlab.com/kicad/code/kicad/issues/7956
2021-03-22 18:49:43 +01:00
Roberto Fernandez Bautista a9eb83201e Remove ZONE::ClearFilledPolysList() and fix ZONE::Unfill()
ClearFilledPolysList is redundant and Unfill() was missing the clearing
of m_insulatedIslands

This fixes potential latent bugs in zone unfilling.
2021-03-21 20:13:20 +00:00
Roberto Fernandez Bautista 50aafb9d2a Do not auto-refill zones when added or edited
The only exception is when using the Zone Properties Dialog and
user preference is enabled
2021-03-21 20:13:20 +00:00
Roberto Fernandez Bautista f6c4677189 ADDED Option to disable automatic zone filling in pcbnew
The new setting is stored as 'editing.auto_fill_zones' and controls
whether zones should be refilled after certain actions or not.
2021-03-21 20:13:20 +00:00
Roberto Fernandez Bautista a743e0c52b Add Zone fill to undo stack
Allows undoing zone filling and reverting to previous fill state.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7440
2021-03-21 20:13:20 +00:00
Jon Evans f1c599fa4d Tweak PCB selection behavior to reduce unintuitive behavior
We were discarding shapes too aggressively for having a
larger area than a shape underneath.

Let's also try showing fewer disambiguation menus, in particular
always preferring items on the active layer when the candidates
include overlapping items of similar area on other layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7949
2021-03-20 13:11:51 -04: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 90742bba9f Adjust constraints after editing other points.
Fixes https://gitlab.com/kicad/code/kicad/issues/7103
2021-03-19 11:35:17 +00:00
Jonathan Haas 95051c4786 Also duplicate arcs in pcbnew
Fixes https://gitlab.com/kicad/code/kicad/issues/7943
2021-03-18 13:35:30 +00:00
pgvoorhees bb8d31cd06 Fix context item selection filter type omissions
Fixes #7839
2021-03-16 13:08:50 +00:00
jean-pierre charras cb451dc4b2 Pcbnew: Fix memory leaks and fix inefficient code. 2021-03-14 20:27:59 +01:00
jean-pierre charras a1b4bcc210 Refinements (add icons to menuitems and better help strings) 2021-03-14 18:44:31 +01:00
jean-pierre charras c763b0088e Fix some issues in drawing_stackup_table_tool.cpp 2021-03-14 17:44:16 +01:00
jean-pierre charras 3ba7fc0cc2 Move board stackup table drawing code from drawing_tool.cpp to drawing_stackup_table_tool.cpp
This avoid a too large drawing_tool.cpp file.
Remove also values in internal units and convert them to mm.
2021-03-14 17:44:16 +01:00
Fabien Corona f428ce03f2 ADDED: pcbnew - stackup / characteristics table 2021-03-13 20:19:46 +00:00
Jeff Young 18470693fe Copy linewidths when coverting to polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/7893
2021-03-13 17:06:49 +00:00
Jeff Young 93db7a130a Offset 3D models when moving footprint origin.
Fixes https://gitlab.com/kicad/code/kicad/issues/7868
2021-03-12 17:37:38 +00:00
Jeff Young a01bd52571 Use default line width when creating polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/7876
2021-03-12 14:54:54 +00: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 ea9c269914 Don't fill polygons converted from lines.
The lines couldn't have been filled, so the polygon shouldn't start
out filled either.  The user can set it to filled if they want.

Fixes https://gitlab.com/kicad/code/kicad/issues/7867
2021-03-11 10:42:21 +00:00
Jeff Young e48f86bfd6 Move default assignment on Mac.
CHANGED: add corner and repeat last command now default to 'I' instead
of '<insert>' on Mac.

1) wxWidgets doesn't currently display the correct graphic in the menu
for the insert key
2) Mac laptops don't have an instert key

Fixes https://gitlab.com/kicad/code/kicad/issues/5016
2021-03-10 13:35:04 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jeff Young 2bc10d58b5 Fix some cases where PCB_FP_ZONE_T was left out.
Fixes https://gitlab.com/kicad/code/kicad/issues/7615
2021-03-08 13:00:46 +00:00
Jonathan Haas 274d4e2eb4 Fix orientation of orthogonal dimensions
When drawing and editing orthogonal dimensions, take distance and
relative position to the end points into account.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7189
2021-03-08 00:13:38 +00:00
Jon Evans 4ddb942ec0 Do not allow drag selection or drag move when already moving something
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7800
2021-03-04 19:01:31 -05:00
Jon Evans 1fc399fa31 Fix a few more cases of picking up wrong mouse positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7745
2021-03-03 20:09:24 -05:00
Wayne Stambaugh 79a9d69ff5 Coverity fixes for issues 314755, 316287, 324536, 324539, and 324539. 2021-03-02 08:10:37 -05:00
Jon Evans 63b5d8db43 Pcbnew: use MRU path when opening files in standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7734
2021-02-28 14:30:16 -05:00
Marek Roszko b82fcbcad6 More exception var disuse warnings 2021-02-26 19:30:58 -05: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
Tomasz Wlostowski e221b11e3b GRID_HELPER: fixed arithmetic issue in segment snap distance check disguised as 'excessive optimization' by the dragger in the router 2021-02-25 17:18:23 +01: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
Seth Hillbrand 0518d9c546 Add more force-immediate tools 2021-02-23 17:05:03 -08:00
Seth Hillbrand 005622027f Add component/footprint is always immediate
When a user clicks on the "Add Component", "Add Power" or "Add Footprint"
icon, they want to add the item.  Requiring an extra click on the screen
before selecting the component/footprint is not needed.
2021-02-23 16:15:31 -08:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Seth Hillbrand 2013a801d1 Fix zone merge undo
Also remove an implicit zone merge that was happening when the user
edited the zone parameters.  This appears to have been a feature but it
happened without a) telling the user and b) having the option to prevent
it.

Fixes https://gitlab.com/kicad/code/kicad/issues/7661
2021-02-22 15:45:17 -08:00