Commit Graph

51 Commits

Author SHA1 Message Date
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
Seth Hillbrand ffcf3b01fc Fixup issue with adding junctions
Segfault when we pass a component to the routine as it expects to see a
selection.
2019-11-27 11:13:01 -08:00
Franck Jullien a5f8340654 eechema: add junction if needed when component is placed
Fixes: lp:1849376
* https://bugs.launchpad.net/kicad/+bug/1849376
2019-11-26 19:23:02 -08:00
Ian McInerney 7339eb31eb eeschema: Allow bus entry labels to rotate and mirror
Fixes: lp:1853079
* https://bugs.launchpad.net/kicad/+bug/1853079
2019-11-23 23:35:21 +00:00
Seth Hillbrand 81ce588a00 eeschema: Set sheet unit number when setting unit
The auto increment needs to ensure the unit number is updated in two
places.  Hierarchy and draw list.

Fixes: lp:1851431
* https://bugs.launchpad.net/kicad/+bug/1851431
2019-11-05 14:04:01 -08:00
Jeff Young 984c64677e Hook up rotate & flip to bus entries when drawing them.
Also adds support for the bus entry shape hotkeys while drawing.

Fixes: lp:1849967
* https://bugs.launchpad.net/kicad/+bug/1849967
2019-11-05 17:22:51 +00:00
Seth Hillbrand bbf355a12f eeschema: Fix an issue with duplicate timestamps
Duplicating into a non-clone still doesn't get a new timestamp, so we
need to explicitly set it.
2019-10-29 16:48:19 -07:00
Seth Hillbrand 7b2d6ab40e eeschema: Allow mult-part placement option
When placing a new component in the schematic, this allows the user to
iterate through all units in the selected component without re-opening
the choose part dialog.  It also allows the optional addition of
multiple copies of the same component to be placed in the schematic.

Fixes: lp:1806217
* https://bugs.launchpad.net/kicad/+bug/1806217
2019-10-29 12:20:14 -07:00
Jeff Young b109aba663 Add a file browser to the Sheet Properties dialog.
Fixes: lp:1840459
* https://bugs.launchpad.net/kicad/+bug/1840459
2019-08-26 00:45:34 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Jeff Young 77334628c4 Change default tool behaviour to skip unhandled events.
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly.  wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do.  (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)

I played around with a couple of ways to fix wxEVT_CHAR_HOOK.  Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.

So I’m changing it so that most tools now skip at the end of their
event loops.  I left out a couple that I felt were high risk (length
tuning, for instance).  But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.

Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
2019-07-26 12:21:24 -06: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 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
Jeff Young 9effd24f3a Allow move tool to run on top of other tools.
Fixes: lp:1784480
* https://bugs.launchpad.net/kicad/+bug/1784480
2019-07-01 22:15:25 +01:00
Jeff Young a72b5416c3 Show preview object for Eeschema junction, noconnect and bus entry tools. 2019-06-28 22:18:30 +01:00
Jeff Young 981072598b Overhaul cursor code for new tool/action framework.
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.

Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
2019-06-27 22:37:11 +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 f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Seth Hillbrand 39c2745f55 eeschema: Allow spaces in label names for multilabeling
This adds the functionality to add multiple labels to your schematic at
once by using spaces in the original label name.

Fixes: lp:1095113
* https://bugs.launchpad.net/kicad/+bug/1095113
2019-06-20 16:21:49 -07:00
Jeff Young 730b89af6d Another round of changes for immediate actions. 2019-06-19 18:35:17 +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
Jeff Young b8dfc1f26a Fix import sheet pin.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-06-18 22:44:22 +01:00
Jeff Young 581b5257e1 One more try getting <ESC>/PopTool behaviour right. 2019-06-18 22:34:31 +01: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 1f35ec5521 Beware of copying events and losing the m_passEvent flag.
Fixes: lp:1833031
* https://bugs.launchpad.net/kicad/+bug/1833031
2019-06-17 14:44:39 +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 de67f3f1e9 Move a few more things to ACTIONs. 2019-06-16 19:53:30 +01:00
Jeff Young 18ebced8f4 Code hygiene. 2019-06-15 20:43:52 +01:00
Jeff Young 5610261dce Immediate-action hotkeys (and context menu actions) for eeschema. 2019-06-15 20:43:51 +01:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +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 f1076c0f48 Fix missing reference keeping history from getting saved.
Fixes: lp:1830185
* https://bugs.launchpad.net/kicad/+bug/1830185
2019-05-31 23:38:15 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jon Evans ab3ada5200 Clear moving flag for second-click-placed items
Fixes: lp:1830227
* https://bugs.launchpad.net/kicad/+bug/1830227
2019-05-23 21:51:14 -04:00
Tomasz Włostowski ecb81426a4 eemodern: fixed use-after-free in SCH_DRAWING_TOOLS::DrawSheet(). 2019-05-23 00:28:58 +02: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
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 0dd1584394 Add import-sheet-pin error message and move messages to status popups.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-16 23:11:22 +01:00
Jeff Young 6630a7227d Constrain SHEET_PIN movement, and keep them attached when resizing SHEET.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-16 22:36:19 +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 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 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
Jeff Young 40f41133b3 Move Circle, Arc, Rectangle and PolyLine tools to modern toolset. 2019-05-10 16:11:57 +01:00