Commit Graph

817 Commits

Author SHA1 Message Date
Jeff Young 658d181ec7 Don't capture cursor if zone or polygon cancelled.
If the client tool indicates it isn't happy for us to continue
(because, for instance, the user has cancelled the Zone Properties
dialog), then make sure we don't capture the mouse.

Fixes: lp: 1740780
* https://bugs.launchpad.net/kicad/+bug/1740780
2018-01-04 13:10:37 -05:00
Jeff Young f76e7568bc Don't warp cursor if the disambiguation menu is cancelled.
Also fixes the empty-selection-context-menu coming up after
a cancelled disambiguation menu.

Fixes: lp:1738339
* https://bugs.launchpad.net/kicad/+bug/1738339
2018-01-02 13:01:55 -05:00
Jeff Young 0f943f1e4b Disambiguation menu fix for footprints with a single pad.
Fix selection disambiguation to allow for selecting of footprints which are
mostly covered by their pads, text, etc.

Fixes: lp:1739425
* https://bugs.launchpad.net/kicad/+bug/1739425

Fixes: lp:1723469
* https://bugs.launchpad.net/kicad/+bug/1723469
2017-12-28 15:36:34 -05:00
Robbert Lagerweij bd7f5081d1 Pcbnew: make the line/arc drawing tool show segment length
This patch adds functionality to the Pcbnew draw tool to show the dx and
dy of the current segment being drawn if the relative origin (pressing
spacebar) is not already set (i.e. if those coordinates are ( 0, 0 ) ).
You can set the relative origin while using the draw tool by pressing
spacebar. The relative origin is reset on exit of the tool.

fixes: lp:1736133
* https://bugs.launchpad.net/kicad/+bug/1736133
2017-12-28 15:14:14 -05:00
Jeff Young dbf39e6333 A bit more commenting for the guessSelectionCandidates logic. 2017-12-21 13:15:23 +01:00
Maciej Suminski 158bc0619d Footprints with pads taking most of area are kept in the selection menu
Improved the selection heuristics to keep footprints in the
disambiguation menu when they contain pads with high pad-to-footprint
area ratio.
In other words: make it possible to select a footprint when
most of its area is taken by a pad. Previously pads were given the
priority, so it was very tricky to select the parent footprint.

Fixes: lp:1739425
* https://bugs.launchpad.net/kicad/+bug/1739425
2017-12-21 10:32:00 +01:00
Maciej Suminski 69ceae0ccf Selection tool: do not select relatively large modules
To avoid situations when a large footprint covering most of the board
area (e.g. shield connector) is always selected, even when user clicks
in a seemingly empty spot, a simple filter has been added. In case
the footprint area covers more than 90% of the view area, the large
footprint is not selected. This way large footprints do not disturb
editing when the zoom is high enough.

Fixes: lp:1636214
* https://bugs.launchpad.net/kicad/+bug/1636214
2017-12-20 17:32:00 +01:00
jean-pierre charras 3183fcb4bc Fix minor compil warnings (some are for old compilers). 2017-12-18 19:52:44 +01:00
Tomasz Włostowski a4528988ca pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449

Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Maciej Suminski 4b62b3519c Update units in 'select track/via size' context menu
Fixes: lp:1485941
* https://bugs.launchpad.net/kicad/+bug/1485941
2017-12-18 17:03:07 +01:00
Maciej Suminski 4671b9b34e Fixed module removal when rotating/flipping a placed module
Module placer did not mark the newly placed modules as selected,
but all edit functions (rotate/place/etc.) rely on getting a selected
item. When a rotation/flip command was issued, the newly placed module
was dropped and the one underneath the cursor has been rotated.

To fix this the newly placed modules are marked as selected.
It also simplifies the placer code a bit.

Fixes: lp:1738148
* https://bugs.launchpad.net/kicad/+bug/1738148
2017-12-14 17:13:42 +01:00
jean-pierre charras c18b638c17 Cosmetic enhancement in GAL: disambiguationMenu: add icons in menuitems, like in Legacy mode. 2017-12-13 19:42:33 +01:00
Jeff Young df76380a2d Don't leave a hidden item behind.
If the object changes between a TA_CONTEXT_MENU_UPDATE
event and a TA_CONTEXT_MENU_CHOICE event (usually as
a result of a cancel), the old code would leave the
last item hidden.

Fixes: lp:1737562
* https://bugs.launchpad.net/kicad/+bug/1737562
2017-12-13 15:59:21 +01:00
Jon Evans b6ac603f0a Fix AlignLeft / AlignRight when using Flip Board view
Fixes: lp:1734377
* https://bugs.launchpad.net/kicad/+bug/1734377
2017-12-11 09:40:08 +01:00
Maciej Suminski f44d4d01ea Fix segfault when removing the last corner of a cutout
Fixes: lp:1736147
* https://bugs.launchpad.net/kicad/+bug/1736147
2017-12-06 16:28:03 +01:00
Tomasz Włostowski fdd5023aee pcbnew: factored out ZONE_FILLER to a separate file 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 56336fdafe POINT_EDITOR: migrate to ZONE_FILLER class 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 83b020d4da PCB_TOOL: added convenience methods for accessing current SELECTION 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Maciej Suminski 769611b79e Do not ask for confirmation to open Properties dialog for a locked footprint
Opening Properties dialog normally does not ask the user to confirm the
action, even for locked items. The exception was a case when there was
nothing selected and Properties dialog was invoked via its hot key -
then SELECTION_TOOL::RequestSelection() tried to get the item under the
cursor, verifying the lock flag.

Fixes: lp:1734537
* https://bugs.launchpad.net/kicad/+bug/1734537
2017-11-28 17:35:46 +01:00
Maciej Suminski db3185723e Drop a locked item after a move operation with a single click
Locked items used to require two clicks to drop an item. This patch
enables dropping with a single click.

Fixes: lp:1716580
* https://bugs.launchpad.net/kicad/+bug/1716580
2017-11-28 15:09:18 +01:00
Maciej Suminski f36350cb88 Do not relaunch the move tool when it is active
Fixes: lp:1678575
* https://bugs.launchpad.net/kicad/+bug/1678575
2017-11-28 10:46:53 +01:00
Jon Evans f107545a82 Show message panel info for highlighted net in GAL (Fixes lp:1518626) 2017-11-28 08:16:58 +01:00
Jose I Romero 3d2b5e3922 Allow items to be moved from all anchor points
A change in commit 5731000135 caused kicad to stop allowing users
to move items like footprints, arcs and lines using anchors other
than the center point.

This was caused by the new code that stores reference points for
clipboard pasting, a call to updateModificationPoint() prevented
some old code paths from executing, which caused the selection to
snap into the cursor, always using the center anchor.

This fix moves the call within the if-cases that need it, and adds
a ClearReferencePoint call when the selection is "dropped" to allow
the user to grab the same selection again from a different anchor.

Fixes: lp:1722512
* https://bugs.launchpad.net/kicad/+bug/1722512
2017-11-23 09:35:39 +01:00
Tomasz Włostowski b76a6210c5 pcbnew: fixed stuck cursor when ForceCursorPosition() is active and cursor is moved by keyboard arrows
Fixes: lp:1729301
* https://bugs.launchpad.net/kicad/+bug/1729301
2017-11-16 00:43:23 +01:00
Tomasz Włostowski 00ad8f24a0 pcbnew: Minor changes in CONNECTIVITY_DATA interface:
- renamed connectivity.[h|cpp] to connectivity_data [.h|.cpp] so that the file name matches the main class name.
- GetNetItems() now returns a vector instead of a list
2017-11-15 18:34:08 +01:00
jean-pierre charras 661bab7220 Fix crash when appending a board in pcbnew.
Fixes: lp:1731539
https://bugs.launchpad.net/kicad/+bug/1731539
2017-11-11 09:09:24 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 3170eba801 refactoring: implemented SELECTION_TOOL's own GetCollectorsGuide() to avoid dependency on PCB_BASE_FRAME 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 781008bfa5 refactoring: allow to run TOOL_MANAGER and SELECTION_TOOL without a host wxFrame 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 8a09a1d329 refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
jean-pierre charras 78ec983632 DRAWSEGMENT fix crash when trying to copy a empty polygon.
SHAPE_POLY_SET: fix crash in VertexCount when it is a empty poly set, or when params are incorrect.

minor other fixes:
warning in degug mode in dialog_dxf_import_base.cpp
pcb_painter.cpp: remove a useless debug line.
2017-10-25 09:39:26 +02:00
jean-pierre charras 9bd5522419 Add a gerber test file
remove a few minor coverity warnings
2017-10-23 09:20:10 +02:00
jean-pierre charras 0b1eb5695f Fix crash when converting selected EDGE_MODULE items to a custom pad. 2017-10-21 12:46:59 +02:00
jean-pierre charras 8ba11dbd68 Minor fixes and enhancements 2017-10-21 11:00:59 +02:00
jean-pierre charras 87821c1490 Explode pad to shapes command: Fix incorrect conversion of primitive to EDGE_MODULE (missing initialization) 2017-10-21 08:48:26 +02:00
jean-pierre charras 55bb35a582 Cosmetic enhancement: add icon to 2 context menus (explode pad to graphic shapes and create pad from graphic shapes) 2017-10-20 18:25:44 +02:00
Tomasz Włostowski 22063dc5a5 pcbnew: clear selection reference point when moving footprint by name
Fixes: lp:1722870
* https://bugs.launchpad.net/kicad/+bug/1722870
2017-10-19 23:57:42 +02:00
Tomasz Włostowski ac095b6724 pcbnew: tools for converting between custom-shaped pads and graphical shapes 2017-10-19 23:35:18 +02:00
Tomasz Włostowski d9bfbb4fec pcbnew: added graphical polygon drawing & editing tools 2017-10-19 23:14:01 +02:00
Maciej Suminski e2ba6da886 Fixed an empty msgid warning (gettext) 2017-10-02 08:49:33 +02:00
Tomasz Włostowski c6a0ad895b pcbnew: code formatting, removed previous module editor copy/paste functions 2017-09-30 14:28:54 +02:00
Tomasz Włostowski adcda4a3e8 pcbnew: prompt for reference point in the message panel, add cut/copy/paste entries in the Edit menu 2017-09-30 14:28:54 +02:00
Tomasz Włostowski 5731000135 pcbnew/copy&paste: multiple improvements:
- fixed netcode propagation bug
- factored out EDIT_TOOL::m_offset, now selection offset is stored in SELECTION class
- added VECTOR2I-based Move/Flip/Rotate methods in BOARD_ITEM
2017-09-30 14:28:54 +02:00
Tomasz Włostowski f573a2e685 wip 2017-09-30 14:28:54 +02:00
Tomasz Włostowski 3fb926a8f2 Fix snapping to anchors in PICKER_TOOL & highlighting of pasted items 2017-09-30 14:28:54 +02:00
Tomasz Włostowski 931a1ccaff Improved copy/paste functionality by Kristoffer:
- added selection of reference point
- added snapping when pasting
- some minor code refactoring
- disabled pasting between footprint and pcb editors due to model incompatibility
2017-09-30 14:28:54 +02:00