Commit Graph

528 Commits

Author SHA1 Message Date
Jeff Young c6606a0582 Hook up delete to undo last segment when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8362
2021-06-19 11:37:20 +01:00
Jeff Young 5bb6b1a3cc Minor cleanup. 2021-06-12 11:39:28 +01:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
david-beinder 86add3bb85 Fix MSVC C4312 warnings when casting 32bit ints to pointer types on 64bit builds 2021-06-05 02:57:51 +00:00
Ian McInerney 23f8851409 Remove pcb_group include from board header 2021-06-03 20:03:31 +01:00
Jeff Young 8e2fb1bdb9 Treat Cut like a Delete while in a Move.
Also fixes problem where second action wasn't getting executed because
the event was getting eaten.

Fixes https://gitlab.com/kicad/code/kicad/issues/8072
2021-05-29 22:10:43 +01:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
jean-pierre charras a5ff27cae7 Pcbnew, EDIT_TOOL::GetAndPlace(): fix and issue, and allows execution only if
called inside the board editor.
Fix also a broken behavior: the current action was not cancelled, and if it is
called during a move items (when typing the 'T' key), items were broken.
The actual bug is the fact it is called also in fp editor and footprint wizard frame,
because it is part of EDIT_TOOL action list, common to fp editor, and should not.
But a full change is much more costly than just a filter.
2021-05-09 11:51:57 +02:00
Fabien Corona 094dd2e08c pcbnew : rotate relatively to selection center 2021-05-04 09:13:20 +00:00
Roberto Fernandez Bautista 98c8f43320 eeschema and pcbnew paste: consistent paste behaviour
Duplicates are reannotated on paste in the same way in pcbnew and
eeschema such that when copying and pasting the same block in the
pcb and schematic, the reference designators will match.
2021-05-03 19:38:32 +01:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Jeff Young 91421f9908 Separate logic for multi-select and click-select when filtering.
Also removes a bunch of old implementations of pad locking and
filtering which are no longer needed.  (They're now handled by the
uniform locking code.)

Also removes some of the auto-promotion logic.  Rotating a footprint
when a pad was selected is going to be surprising whether the pad
is locked or not.

Fixes https://gitlab.com/kicad/code/kicad/issues/8322
2021-04-29 00:07:35 +01:00
Jeff Young 5bf37a9b24 Don't allow selection crossing a parent/child relationship.
Fixes https://gitlab.com/kicad/code/kicad/issues/8292

Fixes https://gitlab.com/kicad/code/kicad/issues/7255
2021-04-26 18:47:44 +01:00
Jon Evans 7569fc8aad Bring back live move of footprint in 3D view if live refresh is on
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8220
2021-04-22 22:32:41 -04:00
Jeff Young cc956695ae Hit test for worksheet before adding Properties to menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/8171
2021-04-11 14:18:35 +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
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
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 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
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
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 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
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
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
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Jon Evans 68b81c8271 Don't copy footprint text along with the footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7647
2021-02-21 19:59:16 -05:00
Jon Evans b2cd97fd84 Don't rotate/flip footprint texts along with the footprint 2021-02-18 12:39:28 -05:00
Mikolaj Wielgus 379c28340f Pcbnew: Do not disable grid snap in copy to clipboard operation
This simple commit makes the Pcbnew copy to clipboard operation snap the
obtained cursor position to grid before the anchors are calculated. This
is also the way the move operation has been apparently working so far.

To be clear, this will not remove all cases where the copy reference
point is not aligned to the grid (see the linked Gitlab issue for
details about the problem). This will still occur for zone outlines that
are not axis-aligned. But such behavior has been so far also present in
the moving operation, so this may be as designed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7507
2021-02-14 01:44:28 +00:00
Mikołaj Wielgus 3e42ba18a9 Show dragging tools in context selection menu for components
Show the dragging tools in the context selection menu when a single
component is selected. Prevent the dragging tools from appearing when
more than one object is selected, as they will not activate anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/7258
2021-01-27 19:55:42 +00:00
Seth Hillbrand 47d5900600 Fix build warnings 2021-01-24 11:37:48 -08:00
Mikolaj Wielgus 04cc64c008 Restore the old reference after rotation or flip instead of clearing
After a rotation or flip the reference point has to be restored to the
previous value to prevent the dragged item from warping to the cursor.
Before this change, the reference point was only cleared, causing odd
behavior when a rotation or flip was performed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7112
2021-01-24 18:56:46 +00:00
Roberto Fernandez Bautista f353fc448b Fix edge cases in EDIT_TOOL::DragArcTrack 2021-01-24 16:41:11 +00:00
Roberto Fernandez Bautista 99d203feae Clarify CIRCLE::ConstructFromTanTanPt
Remove unused bool aAlternateSolution and add doxygen comments
2021-01-24 16:41:11 +00:00
Roberto Fernandez Bautista 48823c0723 Formatting fixes and fix qa_kimath following rebase 2021-01-24 16:41:10 +00:00
Roberto Fernandez Bautista 6e7ae93cc8 EDIT_TOOL::DragArcTrack Fix incorrect undo history when items are deleted
Need to make sure we only apply one COMMIT operation per object before calling COMMIT::Push() or COMMIT::Revert()
2021-01-24 16:41:10 +00:00
Roberto Fernandez Bautista 2b5c1bae97 CHANGED: Dragging a curved track starts an interactive resizing of it, keeping start an end points tangent 2021-01-24 16:41:10 +00:00
Michael Kavanagh 479487ceb1 Tidy up context menus a bit
Try and put the common actions in the same places
2021-01-17 22:42:03 +00:00
Jeff Young 68efdb2fff Push shared parts of GRID_HELPERs into common. 2021-01-16 23:18:10 +00:00
Seth Hillbrand c09dc5abdd Prevent locking items in footprint editor
Adding footprints to the board now has a preference for whether we want
pads locked or unlocked by default
2021-01-11 11:23:26 -08:00
Seth Hillbrand cf2dd0bd38 Fix edit_tool pad handling
Check for footprint editor
Promote pad edits to footprint edits iff
 - Pad is locked
 - Footprint is not

Otherwise, handle the pad normally and prompt for locked items if found
2021-01-08 19:46:14 -08:00
Seth Hillbrand 721155165d Don't move locked footprint if pads are locked 2021-01-08 13:58:26 -08:00
Seth Hillbrand 9424d66d22 Move footprint when selecting locked pad
Prompting to unlock is obtrusive and blocks the common action of
dragging from a pad to align footprints.  The less common action of
editing pads in layout can be accomplished after unlocking the pads

Fixes https://gitlab.com/kicad/code/kicad/issues/6997
2021-01-07 19:46:06 -08:00
Jon Evans 24435df6b0 Don't update 3D view on cursor movement
Our rendering pipeline is not set up for this kind of speed,
and this is a blocking operation at the moment.

Note that we will get an update at the end of the move
because OnModify does it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6819
2021-01-07 20:43:14 -05:00
Seth Hillbrand c0f940438a Clarify Flip action
Fixes https://gitlab.com/kicad/code/kicad/issues/6954
2021-01-06 13:02:44 -08:00
Jeff Young 70967bfebd Hierarchical menu parents don't get ...'s.
Also moves the Convert menu up a level.  Nested hierarchical menus
should be avoided whenever possible.
2021-01-06 17:21:49 +00:00