Commit Graph

2090 Commits

Author SHA1 Message Date
Ian McInerney 29cc16a4c4 Push pcbnew layer alpha change update into base frame
This code was shared between the footprint frame and
pcb edit frame, so push it into the base edit frame.
Also remove the dummy wxUpdateUIEvents that weren't
actually being used.
2021-04-07 17:39:48 +01:00
Jeff Young 3fd3be9843 Layer fixes for PCBNew drawing tools.
1) Implement layer changes for dimension drawing tool
2) Ensure drawing layer is visible for (1) and for the text drawing
tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-07 15:02:48 +01:00
Jeff Young e50b450092 Formatting and organisation. 2021-04-07 14:50:29 +01:00
Roberto Fernandez Bautista 211fd65c23 Move: Ignore mouse up and click events until a mouse move / drag event
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8123
2021-04-06 17:29:52 +00:00
Jeff Young 09b2db3139 Test for group in footprint was snagging all footprint children.
Fixes https://gitlab.com/kicad/code/kicad/issues/8121
2021-04-06 18:27:43 +01:00
Roberto Fernandez Bautista 235688e459 Less restrictive Arc Track Dragging tool
Use the connecting straight tracks even if not exactly parallel - allow
an error margin configurable in ADVANCED_CFG (default 1 degree). Also
be less strict about end point matching and use the width of the track
as the criteria to determine suitability.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7967
2021-04-06 12:52:01 +00:00
Jeff Young ec45855aed Make sure drawing layer is visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-06 00:06:23 +01:00
Ian McInerney 83ae28f04f Fix selection when pasting/duplicating items
The item flags weren't getting reset after placing
the new items, so the next operation on them was
having weird behavior.

Fixes https://gitlab.com/kicad/code/kicad/issues/7528
2021-04-03 19:09:21 +01:00
Mikolaj Wielgus 99fd872fce Pcbnew: Do not move footprint fields twice in align/distribution tools
Fixes https://gitlab.com/kicad/code/kicad/issues/8094
2021-04-02 21:09:36 +00:00
Mikolaj Wielgus 7655533412 Do not move footprint fields twice when performing Move Exactly
Fixes https://gitlab.com/kicad/code/kicad/issues/8062
2021-04-02 21:07:59 +00:00
jean-pierre charras d3bf20e80b Pcbnew, place free via: take netcode from the pad, if the via is inside a pad.
Fixes #8089
https://gitlab.com/kicad/code/kicad/issues/8089
2021-04-02 17:19:44 +02:00
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