Commit Graph

189 Commits

Author SHA1 Message Date
Michael Kavanagh 9414f65a3f Eeschema: allow Properties... in wire context menu
Seems to have been forgotten from 91fd0635
2020-05-30 14:29:53 +00:00
Wayne Stambaugh 91fd063585 Eeschema: allow editing of wire and bus properties.
CHANGED: Wire and bus lines properties (color, line width, and line type)
can be edited the same as graphical lines.
2020-05-29 14:33:27 +00:00
Jeff Young f3e4e61fa7 Push some more editing code out to the tool framework. 2020-05-27 23:29:51 +01:00
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +01:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Jeff Young ba301c292a Check for single item seletion for most property dialogs. 2020-05-13 13:42:23 +01:00
Jeff Young ec5f7b35a9 Attempt to fix crash with RMB on un-selected graphic line.
Fixes https://gitlab.com/kicad/code/kicad/issues/4414
2020-05-12 19:48:59 +01:00
Wayne Stambaugh 1840fe351e Eeschema: fix assertion when duplicating a sheet.
The duplicate sheet code path assigned a SCH_SCREEN object instead of a
SCH_SHEET object as a parent.  A recently added assertion to check for
this did it's job.

Fixes https://gitlab.com/kicad/code/kicad/issues/4369
2020-05-08 14:57:44 -04:00
Jeff Young f6d1aa1f42 Fix some failures to drop hover selections after executing a command.
Fixes https://gitlab.com/kicad/code/kicad/issues/4330
2020-05-06 19:02:21 +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 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
Jeff Young 122b1ddaae Unwrap an unnecessary layer now that we have new config stuff. 2020-04-13 20:58:12 +01:00
jean-pierre charras 615deb40f3 Eeschema: move, mirror and rotate block: fix some issues.
Fixes #4111
https://gitlab.com/kicad/code/kicad/issues/4111
2020-03-28 13:17:59 +01:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
Jeff Young dc9882c3b9 Fix a few bugs with Sheet field dragging and rotating.
Fixes https://gitlab.com/kicad/code/kicad/issues/4046
2020-03-12 13:57:29 +00:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jeff Young 88eab8134e Fix a couple of uninitialized variables (from Coverity scan). 2020-01-11 00:11:31 +00:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +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
Jon Evans d5a80e9cfd Fix shadowing warning 2020-01-03 18:52:46 -05:00
Franck Jullien ea218bc722 eeschema: Allow hierarchy navigator to stay open
ADD: User can now decide to keep the hierarchy navigator open while working
on a schematic.

This behavior can be configured in eeschema->preferences->eeschema->Editing options.
2020-01-03 21:08:40 +01:00
Ian McInerney 81292d2bf1 eeschema: Cleanup processing for multiple line editing 2020-01-03 19:30:29 +00:00
Mark Roszko b84fe2b703 ADDED: Editing style of multiple graphical lines at the same time.
Provides the ability to quickly set the style of multiple lines.  This is only allowed if the selection includes _only_ graphical lines.
2019-12-31 04:05:51 +00:00
Mark Roszko d3edeaec50 Fix "Properties" not appearing in right click menu for graphic line. 2019-12-26 15:15:34 +00:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Seth Hillbrand 92011d91d2 eeschema: Testing for static/dynamic cast failure 2019-10-18 15:29:26 -07:00
Seth Hillbrand 363281dd4d eeschema: add junction when needed for broken wire
The break wire command will break all wires at a point.  If there are
multiple crossing wires, we need to check to see if a junction might be
required to reflect the new connection.

Fixes: lp:1848450
* https://bugs.launchpad.net/kicad/+bug/1848450
2019-10-17 12:22:57 -07:00
Jeff Young 44a1cf9f1b Implement quiet-mode for selection clearing.
Also adds comments for exising quiet-mode calls.

Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young efbc802f4d Fix sheet rotation issues.
1) When sheet pins are on 3 or more sides there's no point in switching
the orientation to vertical.
2) Careful that we don't cause the sheet to walk when rotating and the
sheet-name or file-name is longer than the side it's on.

Fixes: lp:1841714
* https://bugs.launchpad.net/kicad/+bug/1841714
2019-09-02 22:36:55 +01:00
Jeff Young fc50ddda64 Implement Paste Special for eeschema.
Also changes the normal paste behaviour to only clear annotations
when a collision is found.

Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Jeff Young 49a0907c55 Force deletion of junctions which were selected.
Fixes: lp:1841456
* https://bugs.launchpad.net/kicad/+bug/1841456
2019-08-27 19:23:07 +01:00
Jeff Young 23fd4b64dd Remove curly braces from netname escaping context.
They're now used for bus definition control characters.
Also fixes the sheet pin edit dialog to correctly escape/unescape
netnames.

Fixes: lp:1840834
* https://bugs.launchpad.net/kicad/+bug/1840834
2019-08-22 10:53:39 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Michael Kavanagh b414cbfada Cleanup doDelete ACTIONs 2019-08-12 13:49:55 -04:00
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Jeff Young c03535343c Don't apply GTK fix to OSX: it produces somewhat random crashes.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-28 11:28:42 -06:00
Jeff Young 70270f5bd1 Fix accidental commit of debugging change. 2019-07-27 23:33:34 -06:00
Jeff Young 0a0eb35ee8 Update comments with latest test results. 2019-07-27 23:27:21 -06:00
Jeff Young 21b90de829 Another attempt to work around Apple's [NSAlert runModal] bug.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-26 16:47:17 -06:00
Jeff Young 815602d1af Fix missing AF_ACTIVATE flags on some tools.
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06:00
Jeff Young 4d4adf0753 A possible hack to work around the apple runModal bug.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-20 17:31:56 -06:00
Jeff Young 0b08e4dcd2 Deactivate other tools when running one based on a PICKER.
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".

Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young 58ca5b71a9 A more robust fix for 36f1d023f0.
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.

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

Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
Jeff Young cd1a1a67fb Add seleciton/brightening/highlighting to images. 2019-07-10 01:14:28 +01:00
Jeff Young 36f1d023f0 Make sure Push/PopTool() go in the right order.
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool().  The new
tool is therefore pushed before the old tool is popped.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young d3d0bdbe17 Go back to rotating selection around center.
Fixes: lp:https://bugs.launchpad.net/kicad/+bug/1833371
* https://bugs.launchpad.net/kicad/+bug/https://bugs.launchpad.net/kicad/+bug/1833371
2019-07-09 00:14:32 +01:00
Jeff Young a9c66e15ea Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
jean-pierre charras fffb0d340f Eeschema: fix not deletable bitmap issue (missing SCH_BITMAP in deletable list).
Also display bitmap info in message panel.

Fixes: lp:1835125
https://bugs.launchpad.net/kicad/+bug/1835125
2019-07-05 10:25:23 +02:00
Jeff Young ad26ece8d4 Add Global Edit Text and Graphics Properties to Eeschema.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
Jeff Young 2ed3bf47bb Improve hittesting for Eeschema and LibEdit delete tools. 2019-06-28 22:18:30 +01:00
Jeff Young 2f23aa9556 Implement a more robust tool stacking architecture.
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop.  (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)

The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
2019-06-27 17:01:31 +01:00
Jeff Young 4eaba20cd3 Real-time highlighting for Pcbnew and ModEdit delete tools. 2019-06-25 21:10:21 +01:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Jeff Young 485d436860 Clear ctx-menu before rebuilding; don't veto ctx-menu mousewarp for non-ctx-menu dialog.
Fixes: lp:1833312
* https://bugs.launchpad.net/kicad/+bug/1833312
2019-06-19 21:17:56 +01:00
Jeff Young 4054d7ddf7 Don't try an intertwine deletion and junction fixup.
Fixes: lp:1833224
* https://bugs.launchpad.net/kicad/+bug/1833224
2019-06-19 19:30:38 +01:00
Jeff Young 3a0256aade Add handle-based editing for eeschema bitmaps.
Also cleans out a bunch of duplicated functionality from the image
editor dialog.

Fixes: lp:1828722
* https://bugs.launchpad.net/kicad/+bug/1828722
2019-06-19 18:35:17 +01:00
Seth Hillbrand e16bf40e60 eeschema: Insert junctions when repeating
This is the v6 analog to 697234dd5

Fixes: lp:1832253
* https://bugs.launchpad.net/kicad/+bug/1832253
2019-06-18 20:12:08 -07:00
Jeff Young dcbd897a95 Push/pop tools even when selected from the toolbar. 2019-06-18 20:24:15 +01:00
Jeff Young 7dd247f1dc Make better use of TOOL_EVENT parameters. 2019-06-18 20:24:15 +01:00
Jeff Young 9e464f9f5b Implement rollover highlighting for Eeschema delete tool. 2019-06-17 22:15:20 +01:00
Jeff Young 7cfe19d9fd Cleanup. 2019-06-17 22:15:20 +01:00
Jeff Young e6d5110ccf Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro.  We do still want it in the
code, however, because the string harvesting is based off of it.

Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
2019-06-17 10:45:23 +01:00
Jeff Young c7bfa9857e Use more reflective naming of what the tool does. 2019-06-16 19:52:07 +01:00
Jeff Young 19aba615c2 Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
2019-06-15 20:43:51 +01:00
Jeff Young 5610261dce Immediate-action hotkeys (and context menu actions) for eeschema. 2019-06-15 20:43:51 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 7f1ed30ff5 Move DeMorgan handling to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young d24a2afaca Fix duplicate to work like paste to keep pins from getting duplicated.
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.

Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
2019-05-27 11:58:56 +01:00
Jeff Young a3dfce5adb Implement common file menu actions and move Eeschema over. 2019-05-25 01:14:21 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Michael Kavanagh 43a5bb72ca Fix swapped mirror icons in eeschema context menu
Fixes: lp:1828631
* https://bugs.launchpad.net/kicad/+bug/1828631
2019-05-24 13:12:58 -04:00
Jeff Young 323ecada8d Generate refresh preview events when objects are moving.
Fixes: lp:1829683
* https://bugs.launchpad.net/kicad/+bug/1829683
2019-05-22 21:48:04 +01:00
Jeff Young fbffb9ae1e Don't put KICAD_T arrays on stack and expect them to be there when you need them.
Fixes: lp:1829748
* https://bugs.launchpad.net/kicad/+bug/1829748
2019-05-22 21:48:04 +01:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Tomasz Włostowski af30eca3cb eemodern: hover selection should autoclear after invoking properties dialog 2019-05-20 21:04:46 +02:00
Tomasz Włostowski 5ea46e8b78 eemodern: initial attempt at inline drag/move actions 2019-05-20 21:04:46 +02:00
Jeff Young 952108dd43 Implement SCH_SHEET_PIN selection, rotation and mirroring.
Fixes: lp:1829521
* https://bugs.launchpad.net/kicad/+bug/1829521
2019-05-18 00:23:12 +01:00
Jeff Young 5f851a4bad Add AutoplaceFields to symbol tool context menu. 2019-05-18 00:21:49 +01:00
Jeff Young 7c25001622 Implement immediate actions for adding and importing sheet pins.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-18 00:21:49 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Jeff Young 69afa27a5f Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset.  It also reduces a whole bunch of duplicated
data.
2019-05-15 17:50:52 +01:00
Jeff Young f9e4ee1fc9 CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.) 2019-05-15 17:50:52 +01:00
Jeff Young ef5c69167a Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.

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

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

Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young 5c39521149 Move Symbol Properties and Pin Table to actions.
Fixes: lp:1804273
* https://bugs.launchpad.net/kicad/+bug/1804273
2019-05-11 15:38:49 +01:00
Jeff Young 792c4328aa Cleanup. 2019-05-10 21:40:08 +01:00
Jeff Young 0c2ba94b16 More sharing between SchEdit and LibEdit. 2019-05-10 20:22:26 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young f3c95ad83c Clean up the RepeatItem architecture and finish deleting the UndoItem facility. 2019-05-10 19:56:20 +01:00
Jeff Young 7da2631b27 Check item before concluding that ConvertText has run.
Otherwise we set item from nullptr back to the selection, and then
we think we're dragging again which causes all kinds of grief.

Fixes: lp:1828067
* https://bugs.launchpad.net/kicad/+bug/1828067
2019-05-10 16:11:57 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Seth Hillbrand 0e5f5d37d1 eeschema: Fix sign error in comparison 2019-05-09 14:10:53 -07:00
Jeff Young 469231ae15 Move Pin, Symbol Text and Symbol Anchor to modern toolset. 2019-05-07 20:39:46 +01:00