Commit Graph

195 Commits

Author SHA1 Message Date
Tomasz Włostowski 60fdc6229d router: fixed inline dragging & settings dialogs inconsistency 2017-08-22 16:44:58 +02:00
Maciej Suminski 31ef52a365 Fix fine-grid cursor movement using arrow keys
Fixes: lp:1497976
* https://bugs.launchpad.net/kicad/+bug/1497976
2017-08-22 15:14:33 +02:00
jean-pierre charras 068f96f2ce Fix untranslatable empty string 2017-08-09 08:29:30 +02:00
Tomasz Włostowski 2d9ab80b4e Few improvements to the GAL router:
- missing 'break track' functionality
- 'drag 45 degree' and 'drag free angle' context menu shorcuts, both in the router tool and in the default context menu
- bugfix: length tuner tool can now be used again

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

Fixes: lp:1708402
* https://bugs.launchpad.net/kicad/+bug/1708402
2017-08-07 14:28:46 +02:00
Maciej Suminski 9aaea050b9 Do not stop dragging after a rotation command
Fixes: lp:1708876
* https://bugs.launchpad.net/kicad/+bug/1708876
2017-08-07 10:02:10 +02:00
Tomasz Włostowski 32185ddcd3 Multiple improvements concerning colors, configuration handling and legacy features in pcbnew:
- support for background color setting
    - removed several global config settings (such as g_Drc_On)
    - wrapped most of global config settings in PCB_GENERAL_SETTINGS class
    - reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
    - new GAL feature for legacy users: double-click (or E) to change track width available as an option.

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

Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
2017-08-04 16:06:57 +02:00
Maciej Suminski 3629fcbf4a Code formatting 2017-08-03 14:28:07 +02:00
Maciej Suminski 1ac34b44bf Removed explicit calls to update ratsnest from EDIT_TOOL 2017-08-01 15:22:23 +02:00
Maciej Suminski 76bd05a69b Prevent creating too many transitions by TOOL_MANAGER
- added TOOL_INTERACTIVE::resetTransitions()
- made protected and moved TOOL_BASE::setTransitions() to TOOL_INTERACTIVE
- TOOL_MANAGER calls TOOL_INTERACTIVE::resetTransitions() instead of
setTransitions()
2017-07-31 15:09:19 +02:00
Maciej Suminski 9e385872a0 Remove an excessive VIEW::Update() call 2017-07-31 15:09:19 +02:00
Maciej Suminski 545a80839b Removed an excessive selection request from EDIT_TOOL 2017-07-27 10:56:26 +02:00
Fabrizio Tappero f453cec938 Changed all Rotate 90 deg CW with Rotate Clockwise. Changed all Rotate 90 deg CCW with Rotate Counterclockwise 2017-07-21 10:28:44 -04:00
Fabrizio Tappero deeeed38a1 deleted several redundant icons in right-click menu. The objective is to get to a more uniforme right click menu look
Signed-off-by: Fabrizio Tappero <fabrizio.tappero@gmail.com>
2017-07-21 10:28:42 -04:00
Maciej Suminski f942e3e31f Fixed a crash when items are unselected when dragging
Fixes: lp:1702355
* https://bugs.launchpad.net/kicad/+bug/1702355
2017-07-19 13:00:51 +02:00
Maciej Suminski 64f00f447f pcbnew - refactor move exactly tool (3/2)
* code formatting
* turned EDIT_TOOL::getAnchorPoint() to static getAnchorPoint()
* removed unnecessary include directives
2017-07-19 11:36:35 +02:00
Robbert Lagerweij b7f2525c5d pcbnew - refactor move exactly tool (2/2)
This patch does the following:
* extracts a method to determine the anchor point of the move
* improves the logic of the anchor point determination for selections of multiple objects which do not contain footprints
2017-07-19 11:36:35 +02:00
Robbert Lagerweij bf832dd941 pcbnew - refactor move exactly tool (1/2)
This patch does the following:
* move the determination of the origin coordinates to the dialog (reduces code duplication)
2017-07-19 11:36:35 +02:00
Maciej Suminski f3fbce9560 Code formatting and clean-up 2017-06-23 15:43:13 +02:00
Tomasz Włostowski 9ad886344b New connectivity algorithm. 2017-06-23 11:12:36 +02:00
Russell Oliver aeb23188f1 Add Position Relative tool 2017-06-12 16:24:52 +02:00
jean-pierre charras 6ed4f9b208 Make EDA_DRAW_FRAME::SetToolID and mouse cursor shape setting working in GAL canvases, and uses same mouse cursor shapes in legacy and gal canvases.
Starting fixing incorrect UI behavior of Zoom to selection in Pcbnew.
2017-06-12 15:16:09 +02:00
Oliver Walters 18488342a5 Improved speed of Duplicate action
- Removed repetitive tool calls
2017-06-12 11:16:30 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Robbert Lagerweij e57c962336 Pcbnew: add option to select origin & anchor in move exactly tool
This patch adds a radiobox to allow the user to select a reference point for
the move. The additional options are: User Origin (set with <space>),
Grid Origin and Sheet Origin (effectively making it an absolute coordinate).

A checkbox is added (where it makes sense) to allow overriding which point
within the component is put on top of the designated coordinate.

Fixes: lp:1460460
* https://bugs.launchpad.net/kicad/+bug/1460460
2017-04-25 11:32:49 -04:00
Maciej Suminski 217593f6bc Fixed selected items drift on rotation/flip 2017-04-20 16:38:19 +02:00
Maciej Suminski d452a5a30c Moved ratsnest update from EDIT_TOOL to PCB_EDITOR_CONTROL 2017-04-20 14:43:42 +02:00
Maciej Suminski bc8668b039 Renamed PCB_ACTIONS::editModifiedSelection to selectionModified 2017-04-20 14:11:59 +02:00
Maciej Suminski bb999f1bbf Fixed items disappearing after a rotation/flip
Fixes: lp:1683831
* https://bugs.launchpad.net/kicad/+bug/1683831
2017-04-20 14:11:59 +02:00
Maciej Suminski e2b95cf97a Removed a redundant update/refresh calls
BOARD_COMMIT handles all necessary updates
2017-04-20 14:11:35 +02:00
Maciej Suminski 74847bf8ff Code formatting and clean-up 2017-04-20 14:01:38 +02:00
jean-pierre charras a35a46804e Pcbnew fix: "create array" extremely slow in GAL mode, due to a useless call of a time consuming method for each new item created. 2017-04-19 14:15:11 +02:00
John Beard c94269e173 Pcbnew GAL: Switch CW/CCW hotkeys to match legacy mode 2017-03-30 16:05:56 +02:00
John Beard 0b593faa93 Pcbnew: correct CW/CCW rotation.
These were backwards since internal angles are CCW due to the inverted Y
axis.

The hotkeys have NOT changed. This means 'R' is now clockwise and
'Shift+R' is anti-clockwise. This is the same as EEschema, but not the
same as Legacy mode.
2017-03-30 16:05:56 +02:00
John Beard d99fbddc22 Enable angle snap for pcbnew GAL ruler tool
This uses the two-point geometry manager to split the logic of the ruler
geometry and the preview item display. This allows the ruler to use that
manager's angle snap feature.
2017-03-22 10:59:47 +01:00
Tomasz Włostowski 2f730cad81 EDIT_TOOL: restore cursor position on exit
Fixes: lp:1671564
* https://bugs.launchpad.net/kicad/+bug/1671564
2017-03-14 10:54:58 +01:00
John Beard 8c3b8ee693 Add a ruler tool to pcbnew GAL
This allows to measure between features on a PCB. It uses a preview
EDA_ITEM in common, but due to the use of the IDs, it's currently
Pcbnew/Modedit only.

This also adds several "utils" for graphical functons useful when
drawing preview items on GAL canvases.

Fixes: lp:1467313
* https://bugs.launchpad.net/kicad/+bug/1467313
2017-03-10 16:21:44 +01:00
Maciej Suminski 3174573361 Removed code resetting VIEW_CONTROLS settings
As the VIEW_CONTROLS settings are managed for each tool,
there is no need to restore the settings to initial state
when a tool is finished.
2017-03-06 15:04:27 +01:00
Tomasz Włostowski cc3d79f932 Reworked selection passing mechanism in SELECTION_TOOL.
- The tools can now specify if the items in the selection must be editable/
deletable. This is groundwork to be able to select/delete DRC markers, which can't
otherwise be edited.
- Fixed disappearing of selected objects
2017-03-03 20:26:34 +01:00
Maciej Suminski 35c7974a96 Enable grid snapping when dragging items (GAL)
Fixes: lp:1668077
* https://bugs.launchpad.net/kicad/+bug/1668077
2017-03-02 15:21:49 +01:00
Jon Evans fd4e2b042c Refactor SELECTION, SELECTION_CONDITIONS, and context menus to common
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.

Fixed compilation warnings on clang (Tom)
2017-02-28 14:47:20 +01:00
Jon Evans 4c83b0a94d Move TOOL_ACTIONs to their corresponding tools; create COMMON_TOOLS
Some grid/zoom tools are left in PCBNEW_CONTROL because they currently
depend on Pcbnew-specific class members.  Once refactoring is done to
make it possible to use all zoom and grid controls outside of pcbnew,
these last tools can be moved to common to match their ACTIONs.
2017-02-22 10:32:48 +01:00
Jon Evans 167f45ca2b Refactor COMMON_ACTIONS into a base and derived class
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
2017-02-22 10:32:48 +01:00
John Beard 1f9c483535 Allow delete whole track in GAL
This commit wires up the as-yet-unused "remove alternate" tool action
and uses it to select copper connections (normally 'U') before deleting
segments.

THis also reverses the sense of Delete and Backspace (Delete used to be
'remove' and Backpace was 'remove alt', now it is reversed). This means
that backspace is the key that removes a segment and Delete removes the
track. This is the same as legacy behaviour. Other delete actions are,
for now, the same between Delete and Backspace.

Fixes: lp:1517213
* https://bugs.launchpad.net/kicad/+bug/1517213
2017-02-10 22:42:55 +01:00
Aurabindo J 112c10fbd9 Pcbnew: Update Ratsnest immediately after rotation/flip/mirror
Provide a visual feedback to the user how each rotation
will affect the routing by immediately reflecting the
change in ratsnest orientation.

Signed-off-by: Aurabindo J <mail@aurabindo.in>

Fixes: lp:1663488
* https://bugs.launchpad.net/kicad/+bug/1663488
2017-02-10 22:25:47 +01:00
John Beard 7045ed92fb Add CCW rotation to GAL canvas
This makes "rotate" into two separate TOOL_EVENTs, which each have a
"multiplier" parameter.

Also added is a namespace for 'free functions' that use TOOL_EVENT
public interfaces (perhaps with other inputs too) to centralise some
decision-making and calculations.

Fixes: lp:1660731
* https://bugs.launchpad.net/kicad/+bug/1660731
2017-02-09 12:50:47 +01:00
Maciej Suminski 7806cb7bca Drag tracks/vias menu entry (GAL) 2017-02-09 12:03:28 +01:00
Maciej Suminski a16586756f Moved EDIT_TOOL::hoverSelection() code to SELECTION_TOOL::CursorSelection() 2017-02-09 12:03:28 +01:00
Maciej Suminski 8dadc18429 Check if selection is not empty before modifying it in EDIT_TOOL
Fixes: lp:1661311
* https://bugs.launchpad.net/kicad/+bug/1661311
2017-02-02 23:32:11 +01:00
John Beard fb6de689b9 Factor an EDIT_TOOL selection routine
Also add some commentary to other EDIT_TOOL selection functions.
2017-02-01 09:57:58 +01:00
John Beard 45b60b1bb0 Add exchange modules GAL tool (in EDIT_TOOL)
Includes tool action and the transistion binding in EDIT_TOOL.

Fixes: lp:1541460
* https://bugs.launchpad.net/kicad/+bug/1541460
2017-02-01 09:57:36 +01:00