Commit Graph

4800 Commits

Author SHA1 Message Date
Jeff Young cd1a1a67fb Add seleciton/brightening/highlighting to images. 2019-07-10 01:14:28 +01:00
Jeff Young 30ec895c96 Cleanup event processing stuff to keep better track of "handled".
See: https://lists.launchpad.net/kicad-developers/msg41471.html .
2019-07-09 21:59:46 +01:00
Jeff Young 483dc24e87 Homogenize selection tools around our HIG.
In particular make addative and exclusive-or selections work the
same way.

Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
jean-pierre charras 8bb3fae5ae Eeschema: fix broken complex hierarchy loading on Windows
The full filename comparison to detect the reuse of a file was broken on Windows
because it mixed a native filename notation (containing the drive id),
and a unix notation (no drive in filename, different separator).
2019-07-09 17:09:24 +02: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 46f47adebe Update symbols after assigning different LIB_IDs.
Fixes: lp:1835612
* https://bugs.launchpad.net/kicad/+bug/1835612
2019-07-09 12:38:41 +01:00
Jeff Young 17d64ac348 Move multi-line editor to Scintilla engine for undo/redo.
Also allows cut/copy/paste and better WYSIWYG tab handling.

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

Fixes: lp:1769150
* https://bugs.launchpad.net/kicad/+bug/1769150
2019-07-09 12:20:31 +01:00
Jeff Young 3a8f32c380 Convert ShowEEschema to an ACTION so it can get a hotkey assignment.
Fixes: lp:1686010
* https://bugs.launchpad.net/kicad/+bug/1686010
2019-07-09 00:43:41 +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 fb881ee209 Update symbol ID before running Update Fields from Library.
Fixes: lp:1827707
* https://bugs.launchpad.net/kicad/+bug/1827707
2019-07-08 22:56:04 +01:00
Ian McInerney e32306c232 eeschema: Fix initial selected text in reference value dialog
Fixes: lp:1834741
* https://bugs.launchpad.net/kicad/+bug/1834741
2019-07-08 14:42:31 -04:00
Jeff Young 772dff7a01 Removed post-page-settings ZoomFitToScreen() calls.
Fixes: lp:1834608
* https://bugs.launchpad.net/kicad/+bug/1834608
2019-07-08 00:06:28 +01:00
jean-pierre charras d92396341e Simulation: do not add .save V(0) and/or .save V(GND) to ngspice.
These 2 nets are internally added by ngspice (info from Holger Vogt)
2019-07-07 17:55:43 +02:00
jean-pierre charras b74bccbb13 Eeschema: fix a bug in LIB_TEXT::Plot, that plotted an empty text.
Fixes: lp:1827124
https://bugs.launchpad.net/kicad/+bug/1827124
2019-07-05 15:54:40 +02: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
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

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

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

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
Maciej Suminski c715a22e1c Symbol Editor: clear IS_NEW flag after placing a pin
IS_NEW flag needs to be cleared after a pin is placed, otherwise further
move operations will keep adding the pin to the edited symbol.
2019-07-03 13:32:47 +02:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
Jeff Young ef03afe289 Fix bugs in new wire/line-width split.
If Symbol Editor isn't open then Eeschema needs to read in the
default line width.

Symbol Editor was failing to write line width parameter back to
properties.

Fixes: lp:1835051
* https://bugs.launchpad.net/kicad/+bug/1835051
2019-07-02 20:00:39 +01:00
jean-pierre charras 34e00bdb6d Eeschema, symbol tree selector: make the selected lib and symbol readable.
Previously, the background was highlighted, but not the text.
On Windows, the text was unreadable, until it was selected.
Now the foreground color is also set to the text selected color.
2019-07-02 19:05:29 +02:00
jean-pierre charras 21d9a3d4bd Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor.
Replace also in lib_manager.cpp some DisplayErrorMessage calls by wxLogMessage calls,
to avoid hanging or crashes, at least on Windows.
wxLogMessage also has the advantage of grouping all messages and displaying them during a idle time.
2019-07-02 18:39:01 +02:00
Jeff Young 109c21aad4 Add line styles and line color to global Edit Text and Graphics Properties.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-02 14:53:06 +01:00
Jeff Young 9ee36b1a87 Small layout fix. 2019-07-02 14:53:06 +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 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
jean-pierre charras 5ed8ba5bf3 Libedit: fix a bug in edit graphic item properties:
When changing the common to units and/or common to convert options, the item properties were not updated.
2019-07-01 12:36:46 +02:00
Jeff Young 9328ec8b52 Separate default line and wire thicknesses.
Fixes: lp:1834324
* https://bugs.launchpad.net/kicad/+bug/1834324
2019-06-30 11:12:42 +01:00
Jeff Young 62d453ecd8 Fetching name got moved, but it got moved to before it was fetched out of the fields grid.
Fixes: lp:1834711
* https://bugs.launchpad.net/kicad/+bug/1834711
2019-06-29 22:44:29 +01:00
Jeff Young d88bddad7e Respect m_DrawSpecificUnit and m_DrawSpecificConvert when pasting.
Fixes: lp:1834719
* https://bugs.launchpad.net/kicad/+bug/1834719
2019-06-29 22:20:40 +01:00
Jeff Young 09b07cd387 Minor adjustments to arc editing algorithms.
1) Don't snap center since it will be re-computed (most likely
off-grid) anyway.
2) Don't flip shape during initial drawing.
2019-06-29 20:03:08 +01:00
Jeff Young 232e21cb37 Restore selection properly after an undo. 2019-06-29 20:03:08 +01:00
Jeff Young 51479c2042 Fix several bugs in selection exhibited by 74LS02.
1) Use PenWidth() (which is clipped at 0) instead of Width()
2) Implement an interior HitTest when a PolyLine is filled
3) Brighten background objects as well as foreground
4) Don't HitTest last segment when PolyLine is not filled

Fixes: lp:1834703
* https://bugs.launchpad.net/kicad/+bug/1834703
2019-06-29 20:03:08 +01:00
Seth Hillbrand 7297208119 Handle all non-length units
Statusbar length updates need to handle default with wxASSERT if there
is not a specific, handled unit.
2019-06-29 09:46:25 -07:00
Ian McInerney 3b645ed305 eeschema: Fix python BOM generators to handle symbols
* Implement proper natural sorting of the reference values
* Perform quoting of all items in BOM generators that use csv.writer

Fixes: lp:1833822
* https://bugs.launchpad.net/kicad/+bug/1833822
2019-06-29 17:24:45 +02:00
Jeff Young a498d7e9c5 Try out a new arc-editing paradigm for LibEdit.
This is based on the notion that in Kicad the start and end-points
are far more important (as they usually connect to other segments)
than the center is.
2019-06-29 16:10:58 +01:00
Ian McInerney c8cd95a718 eeschema: Force focus on dialog after BOM creation
Fixes: lp:1834698
* https://bugs.launchpad.net/kicad/+bug/1834698
2019-06-28 19:31:00 -07:00
Jeff Young 2ed3bf47bb Improve hittesting for Eeschema and LibEdit delete tools. 2019-06-28 22:18:30 +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 7208ef481f Don't confuse a pasted pin with being synchronized.
It's only at the same location because it was copied from there.

Fixes: lp:1834377
* https://bugs.launchpad.net/kicad/+bug/1834377
2019-06-27 00:24:42 +01:00
Jeff Young 5e40de9357 Clear IS_NEW flag after placing pin so the tool knows we're no longer drawing.
Fixes: lp:1834376
* https://bugs.launchpad.net/kicad/+bug/1834376
2019-06-27 00:02:13 +01:00
Jeff Young f11de08fa9 Clarify that default text size is for schematic text.
Fixes: lp:1818668
* https://bugs.launchpad.net/kicad/+bug/1818668
2019-06-26 21:54:03 +01:00
Jeff Young 7292ce6a8b Improve eeschema selection disambiguation logic. 2019-06-26 21:54:03 +01:00
Jeff Young fa84babefe Re-implement sch->pcb cross-probing using net highlighting architecture.
Fixes: lp:1827853
* https://bugs.launchpad.net/kicad/+bug/1827853
2019-06-26 21:54:03 +01:00
Jeff Young c77d214c5f Clear annotation of pasted sheets only when they already exist in the current hierarchy.
Fixes: lp:1833205
* https://bugs.launchpad.net/kicad/+bug/1833205
2019-06-26 21:54:03 +01:00
Jeff Young 15cd13ba6e Don't tie generic validators to a specific field.
Fixes: lp:1834103
* https://bugs.launchpad.net/kicad/+bug/1834103
2019-06-26 01:13:15 +01:00
Jeff Young cb1fd069f0 Fix inadvertant check-in of debugging code. 2019-06-26 00:51:33 +01:00
Jeff Young 89d1d3d299 Real-time highlighting for PlEditor delete tool. 2019-06-25 21:10:21 +01:00
Jeff Young 4eaba20cd3 Real-time highlighting for Pcbnew and ModEdit delete tools. 2019-06-25 21:10:21 +01:00
jean-pierre charras 31c254d8c1 SCH_EDIT_FRAME::FixupJunctions(): avoid flagging schematics as modified, when no junction is added. 2019-06-25 18:23:28 +02:00
jean-pierre charras 1cc05f19b5 SCH_EDIT_FRAME::FixupJunctions(): do not change the opened sheet after running the code. 2019-06-25 17:30:37 +02:00
Wayne Stambaugh 288982b15d Symbol and footprint library table editor fix.
Prevent the symbol and footprint library table editors from substituting
the current project path (${KIPRJMOD}) when adding libraries to the global
library table.  This will almost assuredly fail when opening a different
project.  We still allow users to manually use ${KIPRJMOD} in global table
paths under the assumption that if they are typing this in then they most
likely understand environment variable substitution.

Fixes lp:1830694

https://bugs.launchpad.net/kicad/+bug/1830694
2019-06-25 08:36:32 -04:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Jeff Young f088d4d762 Add env-var setting to CommonSettingsChanged().
Fixes: lp:1804925
* https://bugs.launchpad.net/kicad/+bug/1804925
2019-06-25 11:34:28 +01:00
jean-pierre charras 70ff2e14a5 Eeschema: avoid crashes when the tool highlight or delete is activated and clicking in a empty schematic.
Was a nullptr not tested.
2019-06-25 08:31:22 +02:00
Seth Hillbrand 98124e68c7 Update exit strategy to match UI guidelines
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q.  When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.

Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
2019-06-24 21:46:42 -07:00
Tomasz Włostowski d7fe307913 eeschema: automatically insert junctions at pin connections if needed during file load
EEschema optimizes wires by merging colinear segments. If a schematic opened without a valid
cache library or missing installed libraries and later saved, this optimization can cause connectivity
errors. In order to fix that we check each pin-wire connection and junctions if necessary.
2019-06-25 01:06:25 +02:00
jean-pierre charras 710a82bc51 Eeschema: fix an issue in netlists when using "<root sheet>" as root sheet path name.
Netlists do not accept any char in netnames (especially spice).
They must use only "/" as root sheet path name.

Especially _( "<root sheet>" ) breaks netlists because:
- there is a space in name, and special chars (< and >)
- it is a translatable name. so the actual name cannot be managed.
- most of netlist code in Kicad expects a "/" as root path.
2019-06-23 19:37:41 +02: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
jean-pierre charras e1a2cbbea1 Eeschema: fix for root sheet plot filename, in non English languages. 2019-06-20 17:00:06 +02: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 eb95202708 Fix grid update when edited from menubar.
Fixes: lp:1833399
* https://bugs.launchpad.net/kicad/+bug/1833399
2019-06-19 18:35:17 +01: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
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 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 b0c1c1ad2b Select both ends of wires in block select.
Fixes: lp:1830717
* https://bugs.launchpad.net/kicad/+bug/1830717
2019-06-18 20:24:15 +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
Seth Hillbrand 42e3c13820 Eeschema: Plot in same order as drawing
This ensures the junctions are on top and the bitmaps are on bottom

(cherry picked from commit ddbc25077c)
2019-06-17 14:59:38 -07: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
Wayne Stambaugh 7235da0979 Eeschema: fix sheet plotting bug.
Prefix the sheet name with "Sheet: " and the sheet file name with "File: "
when plotting so that it matches the display sheet rendering.

Improve the root sheet plot file name.

Fixes lp:1832081

https://bugs.launchpad.net/kicad/+bug/1832081
2019-06-17 17:01:05 -04:00
Wayne Stambaugh d74ec1a1b2 Eeschema: allow empty field strings in field table editor.
The grid apply code was always preventing empty fields.  Change this the
broken behavior to allow any field to be empty except the reference and
value fields.

Fixes lp:1832722

https://bugs.launchpad.net/kicad/+bug/1832722
2019-06-17 15:05:11 -04:00
jean-pierre charras 15a67fc358 Eeschema: fix incorrect size of junctions on screen.
Fixes: lp:1831931
https://bugs.launchpad.net/kicad/+bug/1831931
2019-06-17 18:06:56 +02:00
Jeff Young 4eab89d9ef Fix OSX button order issue in Unsaved Changes dialog.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.

Lastly, regularizes the Unsaved Changes strings between the apps.
2019-06-17 17:01:57 +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
Seth Hillbrand 875caa694c Eeschema: Allow junction dots to be hidden
Drawing junction dots at the line width allows users who do not like
them in their schematics to avoid having them drawn.

(cherry picked from commit 75b5324762)
2019-06-17 05:01:28 -07:00
Jeff Young 5d7739a662 Handle '&'s in menu labels.
Fixes: lp:1832904
* https://bugs.launchpad.net/kicad/+bug/1832904
2019-06-17 10:45:23 +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
Wayne Stambaugh 418bd28347 Fix build error. 2019-06-16 18:31:10 -04:00
Jeff Young dd3617cfda Fix compile issue. 2019-06-16 22:46:35 +01:00
Jeff Young de67f3f1e9 Move a few more things to ACTIONs. 2019-06-16 19:53:30 +01:00
Jeff Young 909aeba3d9 Transition some more stuff from the MVC view to the controller. 2019-06-16 19:53:30 +01:00
Jeff Young c7bfa9857e Use more reflective naming of what the tool does. 2019-06-16 19:52:07 +01:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
Wayne Stambaugh be8fe3884f Fix spelling error in symbol library table warning string. 2019-06-16 12:26:47 -04:00
Wayne Stambaugh 77bf575742 CvPcb: fix save changes dialog layout issue.
DIALOG_EXIT was not being laid out correctly after setting the dialog
message.  Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT.  This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.

Remove DIALOG_EXIT_BASE as it is no longer required.

Fixes lp:1832899

https://bugs.launchpad.net/kicad/+bug/1832899
2019-06-16 12:10:24 -04:00
Jeff Young e4fbd003e0 Make m_passEvent event-specific rather than global.
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
2019-06-16 12:06:49 +01:00
jean-pierre charras 6a8e69f9c9 Fix a compil warning. 2019-06-16 09:12:32 +02:00
Jeff Young 0f4bdbd184 Tighten down the POINT_EDITORs a bit more. 2019-06-16 01:33:39 +01:00
Jeff Young 18ebced8f4 Code hygiene. 2019-06-15 20:43:52 +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 83ee51370c Cancel interactive editing when switching sheets.
Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
2019-06-14 16:54:46 +01:00
Maciej Suminski 7d69a917b9 Fixed a crash in EE_SELECTION_TOOL::SelectPoint()
The for loop is continued after an item removal, so the removed item
is not accessed anymore.
2019-06-14 13:00:39 +02:00
Seth Hillbrand fb3d1bdb59 Clear some compile warnings 2019-06-13 15:16:54 -07:00
Jeff Young 8cc1e2b5e7 Fix breakage in wire moving/dragging/etc.
Fixes: lp:1832750
* https://bugs.launchpad.net/kicad/+bug/1832750
2019-06-13 19:58:37 +01:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Steven A. Falco 1edeba7fb4 Show the current grid setting. 2019-06-13 14:34:39 -04:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Jeff Young 4043a15482 When pasting a sheet link to existing copy if it already appears in the hierarchy.
Fixes: lp:1830633
* https://bugs.launchpad.net/kicad/+bug/1830633
2019-06-13 15:51:32 +01:00
Wayne Stambaugh 028973d182 LibEdit: fix library tree refresh issue when library is removed.
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view.  Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().

This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table.  Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.

Fixes lp:1821691

https://bugs.launchpad.net/kicad/+bug/1821691
2019-06-13 07:45:03 -04:00
Seth Hillbrand e52afd93a3 Remove Legacy options for overlay/context
These options were used to support the legacy canvas when drawing on
MacOS and GTK3.  With the move to 100% GAL, they are extraneous.  This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
2019-06-12 06:01:03 -07:00
Seppe Stas 455ee4c08c Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
2019-06-12 04:40:03 -07:00
Jeff Young c0e1f7a17a Add dragging of wire ends, corners and junctions.
Fixes: lp:1830007
* https://bugs.launchpad.net/kicad/+bug/1830007
2019-06-11 21:20:19 +01:00
Jeff Young b1b7408cf2 Accidentally checked in some debugging stuff. 2019-06-11 18:53:36 +01:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
Jeff Young 05652d4787 Rework the preparation for eeschema's move-tool.
There are a whole bunch of cases which all have to work:
 regular move
 move followed by drag
 drag followed by move
 move followed by duplicate
 duplicate
 paste
and all both with and without Warp Mouse on Move checked.
2019-06-11 18:03:16 +01:00
Jeff Young e4d16abcbd Fix overly-generic flag test when synchronizing pins.
Fixes: lp:1832170
* https://bugs.launchpad.net/kicad/+bug/1832170
2019-06-11 09:29:30 +01:00
Jeff Young 09a3c5b280 Update pasted items' parent pointers.
Fixes crashes when trying to manipulate the item after the paste,
and weird redraw behaviour with pins.

Fixes: lp:1832178
* https://bugs.launchpad.net/kicad/+bug/1832178
2019-06-11 09:22:56 +01:00
Jeff Young 6623ab91a8 Fix issue with picker tool activation. 2019-06-11 00:25:38 +01:00
Jeff Young e9017ce0b1 Update status bar when selected items are modified.
Fixes: lp:1831801
* https://bugs.launchpad.net/kicad/+bug/1831801
2019-06-10 23:46:01 +01:00
Jeff Young b3e30e50c8 Cleanup. 2019-06-10 23:46:01 +01:00
Jeff Young b0e8443383 Sync-ing of menu has been done in CONDITIONAL_MENU for some time now. 2019-06-10 23:46:01 +01:00
Jeff Young a568e70b99 Follow naming conventions. 2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 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 e606587ff6 Move remaining Symbol Tree ctx menu cmds to ACTIONS.
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
John Beard 7ebda0247f Common: Remove legacy_gal library, fold into common
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.

This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +01:00
jean-pierre charras beb4348016 Eeschema: fix incorrect saving in prj config on the default netlist format.
It was not always saved, and this was not the default, but the last used format.
2019-06-10 18:44:46 +02:00
Seth Hillbrand bc096dc4ee Eagle: Fix stacked NC pin import
Since Eagle does not connect stacked NC pins but KiCad will if the pins
are coincident, we choose to only import the first of the stacked NC
pins.  While this creates symbols that are slightly different in pin
count from the Eagle version, it keeps the schematic and netlist
functionally correct relative to the Eagle version.

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

(cherry picked from commit 370109b868)
2019-06-09 17:03:44 -07:00
jean-pierre charras bc27b0ed5f Sim spice: fix unescaped netnames in spice netlist and simulator dialogs.
Net names in eeschema that include '/' are escaped ('/' replaced by "{slash}")
Escaped netnames are only for internal use, and must be unescaped in spice netlist and dialogs.
2019-06-09 17:48:01 +02:00
jean-pierre charras df5c5c23ca Eeschema: fix incorrect handling of '/' in graphic texts.
It was escaped (replaced by "{slash}") in dialog.
This is right for labels, not for texts.
A consequence was the directives in spice simul can be broken.
Now the graphic text is not escaped.
2019-06-08 17:32:49 +02:00
Seth Hillbrand 598b140112 eagle: Strip newlines from description
Eeschema old format is line-terminated so the newlines in descriptions
will break the schematic file if saved.

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

(cherry picked from commit fb85612f81)
2019-06-07 22:08:58 -07:00
Jon Evans 607650be22 Connectivity: don't consider neighbor propagation when types don't match
Fixes: lp:1831608
* https://bugs.launchpad.net/kicad/+bug/1831608
2019-06-05 22:26:44 -04:00
Jon Evans 1142eb259b Eagle: properly translate group buses now that we support them 2019-06-05 22:09:09 -04:00
Jon Evans 42887544c9 Connectivity: ensure globally-labeled buses are always propagated
Fixes: lp:1822964
* https://bugs.launchpad.net/kicad/+bug/1822964
2019-06-05 21:33:20 -04:00
Jon Evans 8d8c743f97 Connectivity: remove unused method 2019-06-05 21:27:56 -04:00
Jeff Young b9927a0655 Don't put standard menu items into symbol tree context menu. 2019-06-05 23:33:15 +01:00
Jeff Young 469fc3b572 Finish moving symbol editor tree context menu to ACTIONs. 2019-06-05 23:29:59 +01:00
Jeff Young 6fab7cc025 Remove a bunch of ugly mutex hacks now that we don't use wxString's UTF8 mode anymore. 2019-06-05 21:23:41 +01:00
Seth Hillbrand c6af38477d CMake: Handle custom_target indirection
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-05 13:05:43 -07:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +01:00
Jeff Young dfcffddbe4 Fix destruction order in Symbol Properties grid table.
wxGrid is VERY cranky about this.  I've only found one recipie that works,
and it must be applied strictly.

Fixes: lp:1831317
* https://bugs.launchpad.net/kicad/+bug/1831317
2019-06-04 15:02:42 +01:00
Jeff Young 1fe848f37c Minor performance enhancements. 2019-06-04 13:56:54 +01:00
Jeff Young 1ea001d497 Go back to event-loop zooming for new frames.
The immediate mode appears to have made things worse not better.
2019-06-04 13:56:54 +01:00
Jeff Young 7c337ec45d Make sure the current desc is shown for parts being edited.
Fixes: lp:1820298
* https://bugs.launchpad.net/kicad/+bug/1820298
2019-06-04 13:56:54 +01:00
Jon Evans 1721cc1700 Ensure pasted sheets get parents set properly for screen discovery
Fixes: lp:1831460
* https://bugs.launchpad.net/kicad/+bug/1831460
2019-06-03 20:30:35 -04:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +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 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
Jeff Young e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 2019-06-03 21:08:30 +01:00
Jeff Young da4fe27447 More ACTIONS work. 2019-06-02 21:10:56 +01:00