Commit Graph

25 Commits

Author SHA1 Message Date
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Marek Roszko 12d21e34e2 Remove trigo.h from eda_text.h 2020-10-13 23:37:48 -04:00
Reece R. Pollack a9c835275a Apply display origin transforms in Pcbnew dialog classes
This commit applies display origin transforms to all Pcbnew
dialog classes that use UNIT_BINDER for their formatting:

  * DIALOG_CREATE_ARRAY
  * DIALOG_FOOTPRINT_BOARD_EDITOR
  * DIALOG_GRAPHIC_ITEM_PROPERTIES
  * DIALOG_GRID_SETTINGS
  * DIALOG_MOVE_EXACT
  * DIALOG_PAD_PROPERTIES
  * DIALOG_POSITION_RELATIVE
  * DIALOG_TEXT_PROPERTIES
  * DIALOG_TRACK_VIA_PROPERTIES
2020-08-26 17:54:22 +00:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Andrew Downing a8dea9274f modify behavior of position relative tool
CHANGED: The reset buttons now set the X or Y offset to the current
offset from the reference position. Selecting individual pads as the reference item is now also possible.
2020-03-02 20:55:06 +00:00
Andrew Downing 2f7ac2b5b4 Don't truncate polar coordinates in position relative dialog/move exact dialog 2020-02-29 02:21:18 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young bc0e67579c Change OK/Cancel to MSW order and move some other dialogs to new system.
(There's no point in following the OSX OK/Cancel order as you can't
tab to buttons on OSX anyway.)
2019-08-26 18:36:35 +01:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
John Beard 82734e7116 Adjust tab ordering in some dialogs
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:

* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative

Also set some initial focus fields in the same dialogs.

Tidy a few includes.

Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
2019-02-23 14:49:38 +00:00
jean-pierre charras db7dba96ad Fix a few Coverity warnings.
Mainly not initialized members, and replace not tested dynamic_cast by static_cast.
2019-01-04 09:49:21 +01:00
jean-pierre charras 8c8ccf83e6 Fix a few I18n minor issues. 2018-11-16 09:43:40 +01:00
Jeff Young 86273e86b9 Added user and grid origins to Position Relative dialog.
Also fixed a refresh bug when doing Position Relative.

Fixes: lp:1792699
* https://bugs.launchpad.net/kicad/+bug/1792699
2018-11-12 23:09:45 +00:00
Jeff Young f3c6e1fb62 Change Position Relative To to use anchor, not centroid.
Fixes: lp:1793984
* https://bugs.launchpad.net/kicad/+bug/1793984
2018-09-24 00:42:56 +01:00
Jeff Young 30bb911154 Bring PICKER_TOOL in line with other tools.
Use standard Magnetize() to handle grid and magnetic pads.

Use the standard menu from PCB_TOOL.  Delegating the menu to
the SELECTION_TOOL just caused grief.

Also brings clients (such as Position Relative To) into line,
and implements better Cancel behaviour.

Also improves visibility of modal status messages:
- moves Select Anchor message from status bar to popup
- moves Select Reference message from dialog to popup

Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-23 00:58:01 +01:00
Jeff Young 2ff414adb4 Simplify Move Exactly and Postion Relative dialogs.
Also removes g_UserUnit references.

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

(cherry picked from commit 1639636)
2018-07-17 15:12:11 +01:00
jean-pierre charras 45dad4ded5 DIALOG_POSITION_RELATIVE: make dialog more understandable.
Better texts, and add a helper comment.
2018-05-18 13:53:31 +02:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
Maciej Suminski 78305c1de5 Converted most of pcbnew dialogs to use TEXT_CTRL_EVAL
This patch enables math expression evaluation for most of the text input
controls in pcbnew.

NEW: pcbnew text input controls are able to evaluate simple
mathematical expressions, including distance units (e.g. 5.0+(2*1.2mm)).
2017-11-24 21:16:05 +01:00
jean-pierre charras 36e59065ff Minor fix: replace assert by wxASSERT in dialog (better to keep trace of an assert inside a wx application) 2017-06-15 13:13:25 +02:00
Maciej Suminski fc58bd3848 Position Relative Move tool fixes
- corrected copyright headers
- code formatting
- made dialog pointer private, added UpdateAnchor() and modified click
handler routine accordingly
- renamed .fbp file to match other dialogs pattern
2017-06-12 16:24:52 +02:00
Russell Oliver aeb23188f1 Add Position Relative tool 2017-06-12 16:24:52 +02:00