Commit Graph

1556 Commits

Author SHA1 Message Date
Seth Hillbrand 8c57821e9b pcbnew: Move ratsnest items to separate folder 2020-06-16 11:15:14 -07:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Eli 2a334a5c59 Updates wording used in alignment submenu to make the actions clearer when icons are missing. Also reorganises the order of items in the submenu. 2020-06-15 16:49:36 +00:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
Seth Hillbrand 899496baaa pcbnew: Remove item from edit selection in favor of parent 2020-06-14 07:29:44 -07:00
Seth Hillbrand 491ac0256d pcbnew: Add a number of missing handles for module zones 2020-06-14 07:23:10 -07:00
Seth Hillbrand 09eee84a3e pcbnew: Handle module zone area in delete
Selections containing zone areas need to be handled separately by
modifying the parent rather than the item itself

Fixes https://gitlab.com/kicad/code/kicad/issues/4653
2020-06-14 07:05:14 -07:00
Jeff Young 47ab7c78a6 Divorce GRID_HELPER from the parent frame.
This moves GRID_HELPER fully into the tool framework.
2020-06-13 22:44:16 +01:00
Seth Hillbrand 4d4d24fc61 Don't snap to arc midpoints
This removes the extra snap points in the arcs, ensuring the endpoint
snaps connect to the correct location on an arc.
2020-06-13 11:23:14 -07:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Ian McInerney a843c74529 Add new kiplatform library for platform-specific code
* Implement ReparentQuasiModal for OSX natively
* Implement ForceFocus of OSX natively

This change means we no longer rely on the kicad-specific functions in our osx wx fork.
2020-06-03 14:58:54 +00:00
jean-pierre charras e3c3dae776 Fix PCBnew crash when show local ratsnest and selecting a footprint with no pads
Fixes #4506
https://gitlab.com/kicad/code/kicad/issues/4506
2020-06-01 09:09:40 +02:00
Jon Evans 5250215d97 Use the calculated bbox for zoomFitSelection
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4120
2020-05-29 16:38:25 -04:00
Jeff Young d99febba6c Treat sketch mode module items and board items the same. 2020-05-26 23:21:38 +01:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Mikołaj Wielgus ecec7192fc Add "Select All" in schematic & layout disambiguation popup menu
ADDED: "Select All" in schematic editor disambiguation menu
ADDED: "Select All" in layout edtor disambiguation menu

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3877
2020-05-24 23:35:04 +00:00
Ian McInerney e18a9d4aa3 Fix mac compile issue introduced in 66929358 2020-05-24 23:53:55 +01:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00
Ian McInerney 4ecf99e7c8 Give the footprint viewer a toolbar and remove the options dialog
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)

This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.

Fixes https://gitlab.com/kicad/code/kicad/issues/2205
2020-05-24 11:58:33 +01:00
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
jean-pierre charras 1d914133c9 Pcbnew, context menu: move createArray,moveExact,positionRelative in a submenu 2020-05-16 16:09:00 +02:00
jean-pierre charras c805b52c39 Tool pad enumerate: show it only in footprint editor.
In board editor, its use makes no sense, and crash Pcbnew.
2020-05-16 15:52:47 +02:00
Jeff Young 935cab160b A bit of defensive code for an unreproducible bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/4376
2020-05-09 14:14:38 +01:00
Jeff Young 19dc1f8b69 Make sure text gets drawn after placing even if the mouse isn't moved. 2020-05-09 14:14:38 +01:00
Michael Kavanagh 8418ac34bc Allow fp text to be group selected in HC mode
Fixes https://gitlab.com/kicad/code/kicad/issues/2259
2020-05-07 21:57:37 +00:00
Jeff Young 889b6cb1b1 Clean up some commenting and rename MODULE_EDITOR_TOOLs to match filename. 2020-05-03 20:56:32 +01:00
Jeff Young 56946f4db1 Fix pad name increment to use last edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/1882
2020-05-03 08:59:51 +01:00
Jeff Young 199bb2ffb0 Add hittesting for worksheets in Pcbnew and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/4282
2020-05-03 00:07:38 +01:00
Jeff Young fec0c235d9 Hook up Footprint Text Line Mode action to handler. 2020-04-27 00:24:57 +01:00
Michael Kavanagh e05f36f9a7 Convert graphic polygons on CrtYd layers to lines
Same restriction as Edge_Cuts, due to their intended purpose polygons
don't make sense.
2020-04-26 18:51:47 +00:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Ian McInerney f649204c04 Allow graphic polygons/keepouts to be closed automatically
ADDED: Auto close option for graphic polygons/keepouts/cutouts
ADDED: Delete last point option for graphic polygons/keepouts/cutouts

Fixes https://gitlab.com/kicad/code/kicad/issues/2350
2020-04-24 18:35:43 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
jean-pierre charras 825d202480 Fix some strings to help translation.
Remove translation mark for strings used in debug, or strings
that cannot be translated (for instance because they are char strings
instead of wide char strings)
2020-04-23 07:40:19 +02:00
Jon Evans b22ff26688 Rename List Nets to Net Inspector to better reflect function 2020-04-21 20:24:27 -04:00
Jeff Young f113370e1e Edit worksheet properties when no other selection is available.
Fixes https://gitlab.com/kicad/code/kicad/issues/4044
2020-04-21 21:17:59 +01:00
Oleg Endo 80e40b862c destroy window when list nets dialog is closed
avoid potential performance issues when the dialog is still listening to
the board updates and refreshing its data and view structures.

it seems useful to keep the settings of the dialog across dialog
open-close cycles.
2020-04-21 13:23:56 +00:00
Oleg Endo 980f4a1f6a make select net dialog non-modal
also make sure to call BOARD::HighLightON before/after calling
BOARD::SetHighLightNet
2020-04-21 13:23:56 +00:00
Oleg Endo 137fe48d88 rewrite select net dialog 2020-04-21 13:23:56 +00:00
Oleg Endo e3aec20f82 move PCB_INSPECTION_TOOL::ListNets into pcb_inspection_tool.cpp, split out dialog_select_net_from_list.h 2020-04-21 13:23:56 +00:00
Michael Kavanagh 7db355e34a ADDED: TOOL_ACTION for switching PNS router mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/2249
2020-04-19 22:44:05 +00:00
Jeff Young cb708aaadb Fix some memory leaks. 2020-04-16 21:57:07 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Simon Richter 5aac36dba9 New enum for trace selection mode
This avoids giving KICAD_T another meaning, which is especially messy here
as "select up to the next via" is encoded as SCH_JUNCTION_T, which belongs
to eeschema.

Also, document what is happening.
2020-04-15 11:17:51 +00:00
Ian McInerney 37a4dd927b Allow deletion of zone cutout areas
ADDED: Ability to delete zone cutout areas

Fixes https://gitlab.com/kicad/code/kicad/issues/4188
2020-04-14 17:57:47 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young e016b629d3 Be smarter about determining if there are modules in the selection list.
The old algorithm would delete modules if another module was in the
list, which was not the intention.

Fixes https://gitlab.com/kicad/code/kicad/issues/4175
2020-04-09 00:06:17 +01:00
jean-pierre charras 25fb2595c8 Fix fully broken selection of items of the same sheet, in pcbnew and from eeschema.
Previously, the full UUID path used to select footprints was full broken.
2020-04-02 14:21:09 +02:00
Ian McInerney 0d79ada3ec Show the pencil cursor when placing an item, but it isn't created yet 2020-04-01 18:24:58 +01:00
Ian McInerney 4b647ba6b1 Refactor microwave parts into the microwave tool 2020-04-01 18:24:31 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young 3b97993daf Another attempt to fix offset issues when pasting board items to ModEdit.
Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-16 18:45:55 +00:00
jean-pierre charras 78a7c7dfe0 Zones: fix a crash when adding a zone cutout to a zone having already holes.
Fixes #4039
https://gitlab.com/kicad/code/kicad/issues/4039
2020-03-12 14:42:32 +01:00
Jeff Young 51b9944667 Fix pasting of items from board to Footprint Editor.
In particular, map the netlist info to the orphaned item, and
adjust the position of module graphic items to no longer be
module-relative.

Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-10 23:07:01 +00:00
Seth Hillbrand 12088f240d Fix a couple crashes with small canvases
The canvas size is not guaranteed to be strictly > 0, so we need to
enforce a minimum returned size before dividing by it or passing to GAL
initialization
2020-03-04 14:33:42 -06:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +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
Tomasz Wlostowski 4525a17076 router: backspace key to undo last fixed segment(s) 2020-02-27 22:02:56 +01:00
Jeff Young cdad62022b Bug fix for double-click in DRC dialog.
Also better clean-up of highlighting in board editor window.
2020-02-25 12:18:24 +00:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras 625249322e Pcbnew: regroup drc files to the already existing drc folder. 2020-02-19 10:31:32 +01:00
Jeff Young 2017389f2d Pinning for library trees in FPEditor and SymbolEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2288
2020-02-14 00:10:40 +00:00
Ian McInerney 8b7d4c2a55 Put tool graphics back on the stack
Now that the tool framework gracefully shutdowns the tools, graphics
can be created on the stack inside a tool function.

This reverts commit f6881ce3de.
2020-02-05 22:23:44 +00:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Jeff Young d8cd48aa7f Allow duplication of module texts from board editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/3829
2020-02-05 22:21:16 +00:00
Ian McInerney 34e5b76c5f Add virtual constructors to some classes that should have them
This is more for safety from undefined deletion behavior than
anything else (it also silences the Clang -Wnon-virtual-dtor warning).
2020-02-05 22:19:14 +00:00
Seth Hillbrand e94f356ad5 pcbnew: Correct stop condition for expand
Typo in selection tool caused expansion past vias.
2020-02-05 14:14:50 -06:00
Jeff Young fbeb0709ef Formatting cleanup. 2020-02-03 19:35:48 +00:00
Jeff Young f1b1c91961 Be a little more friendly towards SMD footprints.
Increase the coverage ratio a bit so that footprints that still
have 10% of their area available for selection won't bring up the
disambiguation menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young d02c0da3ab Remove preferred layer disambiguation for multiple modules.
The preferred list isn't actually in use anymore at this point, so
it currently has no effect other than to mess things up since we
aren't keeping track of which modules have been rejected when we
check the module count.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young 89dfee9ebe Employ an accuracy when hittesting (particularly for lines).
Also fixes a bug where the parent module was being hit-tested
for its children.

Fixes https://gitlab.com/kicad/code/kicad/issues/3750
2020-02-03 15:08:01 +00:00
jean-pierre charras fd0728becf Fix an other crash similar to f6881ce3. 2020-01-31 16:41:47 +01:00
jean-pierre charras f6881ce3de Fix crash after calling EDIT_TOOL::pickCopyReferencePoint()
An instance of STATUS_TEXT_POPUP was created on the stack.
But it crashes pcbnew when closing the current main frame,
perhaps due to stack switching in coroutines.
It is now created on the heap.
2020-01-31 16:08:18 +01:00
Alexander Shuklin 3d0b3a51f3 Eeschema: Adding back annotation
ADDED: Back annotation algorithm,
eeschema back annotation dialog

CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
jean-pierre charras 48ae188b15 Zone filler: fix a few issues, in Smoothed Polygons mode.
- Fix non optimal shape of solid polygons after inflate transform.
- Add a small extra clearance ((2 microns) when creating clearance areas
(especially, convert arc to polygons create small differences)
- Add a small threshold (1 micron) in drc test distances to avoid false positives
- fix a minor issue in TransformOvalToPolygon that created sometimes a not perfect shape

Fixes #3812
https://gitlab.com/kicad/code/kicad/issues/3812
2020-01-26 18:19:24 +01:00
jean-pierre charras d12e8479f2 Pcbnew: fix crash when trying to select the previous copper layer.
The function that calculates the previous layer id was using a illegal value
in some cases.

Fixes #3805
https://gitlab.com/kicad/code/kicad/issues/3805
2020-01-24 10:13:18 +01:00
Seth Hillbrand 7c296fbcb7 GRID_HELPER: Provide alignment axes from snap points
ADDED: alignment lines from item snap points

Alignment lines are shown when moving the cursor horizontally or
vertically from a possible snap point.
2020-01-18 20:43:40 -08:00
Jeff Young 9df2cfb328 More uninitialized variables. 2020-01-13 20:16:40 +00:00
Jeff Young 91d1508c16 Fix some Coverity identified issues. 2020-01-13 20:16:40 +00:00
Ian McInerney 34bc0a4e96 pcbnew_control: Replace C casts with C++ casting 2020-01-13 14:19:44 +00:00
Ian McInerney e2853862e5 Cleanup redundant type casting 2020-01-13 14:00:45 +00:00
Ian McInerney 8fc434be19 Formatting change for dynamic cast tests 2020-01-13 01:48:57 +00:00
Jeff Young 94f8aafec5 Fix missing variable initialization. 2020-01-13 00:18:49 +00:00
Jeff Young 8d0f31f6f4 Clean a bunch of legacy code out of the Filter Selection dialog. 2020-01-12 20:53:56 +00:00
Jeff Young 127c66285b Rename old DIALOG_BLOCK_OPTIONS to DIALOG_FILTER_SELECTION....
... which is what it has done for some time now.
2020-01-12 20:30:58 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Jeff Young e03281a9ae Allow exclusive-or selections on OSX. 2020-01-10 22:32:49 +00:00
Seth Hillbrand 16026e75cf pcbnew: Don't compare across containers
std:: defines cross-container comparison as invalid and is not
guaranteed to work.  This breaks the comparison out into separate
steps, each for the separate containers.
2020-01-07 16:03:32 -08: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
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Fabien Corona 496f3d49e4 pcbnew: When using '+' and '-' hotkeys, skip non-visible layers
CHANGED: pcbnew: When using '+' and '-' hotkeys, skip non-visible layers

Fixes https://gitlab.com/kicad/code/kicad/issues/3443
2019-12-29 23:37:25 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
jean-pierre charras a12b803af5 Add missing option to show footprint texts in fill or sketch (line) mode.
This option is settable in stable version, but not in master.
So, this option set from the stable version could be modified in master version.
2019-12-23 18:11:45 +01:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00