Commit Graph

8080 Commits

Author SHA1 Message Date
Jeff Young 1548dcfe8d Fix typo in Pad Enumeration tool.
Fixes: lp:1831950
* https://bugs.launchpad.net/kicad/+bug/1831950
2019-07-03 18:53:13 +01: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
Jeff Young a2fe319b92 Fix bug introduced when edge-thickness adjustments were moved.
Fixes: lp:1835132
* https://bugs.launchpad.net/kicad/+bug/1835132
2019-07-03 12:12:00 +01:00
Jeff Young 0eed5175cc Fix crash in Pcbnew drawing tools.
Couple of typos: return !cancelled instead of cancel, and some breaks
on the wrong side of the braces.

Fixes: lp:1835172
* https://bugs.launchpad.net/kicad/+bug/1835172
2019-07-03 11:44:30 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
Seth Hillbrand 9460f207f5 Fix misc build warnings
This removes unused static function in page layout editor, unused
variable in pcb_painter and restors the gcc unitialized fix for
pcbnew's drawing_tool.
2019-07-02 10:32:49 -07:00
Jeff Young 1c30f3d9a9 Give up on KillFocus validation.
wxWidgets sends the KillFocus event before the Cancel button event,
and it sets the receiving-focus window pointer to NULL (so you can't
even check for it being the Cancel button.  Last time around (with
the UNIT_BINDER) I also tried a bunch of hacks for whether the window
pointer is NULL, etc., but they aren't discriminatory either.

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

Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
2019-07-02 17:04:08 +01:00
Jeff Young da71a51029 Cleanup. 2019-07-02 00:48:05 +01:00
Jeff Young 29db6152b3 Only warn once in KillFocus for each error value in footprint name.
More than that just gets annoying, and there is at least one edge case
which throws us into an infinite loop if we don't have something to
break us out.

Fixes: lp:1834966
* https://bugs.launchpad.net/kicad/+bug/1834966
2019-07-02 00:47:52 +01:00
Jeff Young faa730dfb1 Fix highlight bug.
Fixes: lp:1834960
* https://bugs.launchpad.net/kicad/+bug/1834960
2019-07-01 22:15:25 +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
Seth Hillbrand 743c650129 Move zone refill to action
This unifies the zone refill across architecture into the tool-based
architecture.  Also provides ZONE_FILLER-based progress managment for
tools.

(cherry picked from commit be9cd98cb1)
2019-07-01 09:27:04 -07:00
jean-pierre charras 978c4fd7d3 Pcbnew, export_footprints_placefile.cpp: code refactor.
Make the data generation code separate from the dialog code.
The dialog itself does not include anymore the data generation code.

Non SMD footprints forced in list are now displayed in the dialog.
The attribute MOD_CMS is no longer silently modified (without undo command) by the dialog.
2019-06-30 18:27:12 +02: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
Seth Hillbrand d650cca088 Enforcing rational limits on length tuner
The length tuning dialog needed validators on close to prevent negative
and percentages >100%

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

(cherry picked from commit 3974c6fd89)
2019-06-29 09:38:27 -07: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
jean-pierre charras bcf690f901 TRACKS_CLEANER algo to merge collinear track segments: some minor fixes. 2019-06-29 09:12:19 +02:00
Seth Hillbrand 3a94ccd6a3 pcbnew: Drop tracks not on copper
We do not allow non-copper routed tracks and they will break assumptions
elsewhere in the code.  We drop them in the beginning so that they are
not saved.

(cherry picked from commit cabfcbc73c)
2019-06-28 19:28:55 -07:00
jean-pierre charras c9ccd8a642 Fix broken TRACKS_CLEANER algo to merge collinear track segments. 2019-06-28 20:23:09 +02:00
jean-pierre charras 71aafb6eb3 Pcbnew, connectivity: fix incorrect detection of dangling track ends when a end is inside a zone.
This end was not detected as connected by the IsDangling method.
Fix incorrect cleaning of dangling tracks in track cleaner.
Remove also a dead code.
The merge co-linear track segments is still full bugged in track cleaner.
2019-06-28 15:25:50 +02:00
Jeff Young 3135334c0c Hook up zone-connection controls in Edit Footprint dialog.
Fixes: lp:1834629
* https://bugs.launchpad.net/kicad/+bug/1834629
2019-06-28 12:24:15 +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 e175eb25b8 Fix bug with accidental modification of legacy hotkey name. 2019-06-27 11:29:05 +01:00
Jeff Young 8efe8d1835 Set library selection when pre-loading the Footprint Viewer.
Fixes: lp:1826932
* https://bugs.launchpad.net/kicad/+bug/1826932
2019-06-27 00:40:36 +01:00
Jeff Young 2ad40ad10a Fix some misplaced parens.
Fixes: lp:1818449
* https://bugs.launchpad.net/kicad/+bug/1818449
2019-06-26 21:54:04 +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 e785c140b9 Eradicate globals for PCB_GENERAL_SETTINGS.
Fixes: lp:1832896
* https://bugs.launchpad.net/kicad/+bug/1832896
2019-06-26 21:54:03 +01:00
Jeff Young 00cf8ba976 Fix rotated & offset pad thermal spoke geometry. 2019-06-26 00:04:35 +01:00
Jeff Young a39023ad22 Resolve() call missing from Route menu.
Fixes: lp:1834187
* https://bugs.launchpad.net/kicad/+bug/1834187
2019-06-25 21:31:20 +01:00
Jeff Young 107d206dba Back to the drawing board for zone filling.
This one doesn't cut any corners so should be "correct".  And it
turns out to be pretty fast.
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
Tomasz Włostowski be42b80713 TRACKS_CLEANER: restart dangling track removal loop every time an item is removed
Fixes: lp:1823973
* https://bugs.launchpad.net/kicad/+bug/1823973
2019-06-25 21:40:30 +02:00
jean-pierre charras c1eee56785 Prepare changes to support a better board stack management in .gbrjob file.
In .gbrjob file, one can specify the thickness and color of some layers.
Currently, there is no way to enter these parameters.
This commit prepare a better support of .gbrjob files.
2019-06-25 18:39:11 +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 7ce38ee6f8 Performance enhancements to zone filling & track DRC.
Significant improvement in fetch time for item clearances.  On large
boards with lots of nets, maybe 10% faster zone fills and about
2x speedup on track-to-track DRC.
2019-06-25 11:34:28 +01:00
Jeff Young d4054029cd Shrink/expand zone by minimum width only after doing all knockouts.
It's too complicated trying to keep everything smaller or larger by
half the pen width, and some things like spoke-end-detection need the
actual outline anyway.
2019-06-25 11:34:28 +01: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
Jeff Young 3784950603 Added more sophisticated checking for thermal spoke connections.
And, again, some more performance optimizations to make up for it.
2019-06-25 11:34:28 +01:00
Jeff Young 49610085ea Don't try to show sub-dialog in OnActivate(). High Sierra asserts.
Fixes: lp:1832635
* https://bugs.launchpad.net/kicad/+bug/1832635
2019-06-25 11:34:28 +01:00
Jeff Young 0ed26e4e33 Fix some geometry error in thermal spoke calculations.
Also introduces some performance enhancements to make up for the
extra time spent in the calculations.
2019-06-25 11:34:28 +01:00
Jeff Young e5cb8a0310 Bug fixes for rotated pad thermal spokes. 2019-06-25 11:34:28 +01:00
Jeff Young 70e6d95c7f More zone fill performance enhancements.
Knocking out unconnected spokes turns out to be very expensive, so
keep them in a list and only apply them if they're connected.
2019-06-25 11:34:28 +01:00
Jeff Young 14986d1e0e Zone fill performance enhancements.
Batch up fast operations to reduce the number of slow operations
required.
2019-06-25 11:34:28 +01:00
Jeff Young 79cd457ba7 Implement thermal spokes for custom pad shapes.
The thermal spokes are anchored at the pad anchor.  They may or may
not make sense, depending on the pad shape.  It's up to the author
to move the anchor around as necessary or to not use thermals.
2019-06-25 11:34:28 +01:00
Jeff Young a19c668891 Add tooltip for local ratsnest tool. 2019-06-25 11:34:27 +01:00
Jeff Young f70ab6203b Make all inner layers available for hotkey assignments.
Fixes: lp:1787073
* https://bugs.launchpad.net/kicad/+bug/1787073
2019-06-25 11:34:27 +01:00
Jeff Young ba7cf09ad5 Add zone display mode toggle action.
Fixes: lp:1759574
* https://bugs.launchpad.net/kicad/+bug/1759574
2019-06-25 11:34:27 +01:00
Jeff Young e1d5cf1a87 Change pad solder masks to use rounded-corner clearances.
This assumes maximum registration errors are a vector, rather than
an amount in both x and y axes.  Lots more disucssion in the bug
report and on the forum (link in the bug report).

Also makes large changes to the painting of pads, but they now use
the same code as plotting, so if there are any changes then they
were errors before since plotting represents "truth".

Fixes: lp:1563744
* https://bugs.launchpad.net/kicad/+bug/1563744
2019-06-25 11:34:27 +01:00
Jeff Young 5c89e4490e Change zone fill algorithm to better handle thermal reliefs.
Thermal reliefs must not knock-out spokes of other pads, while
clearances must knock-out spokes of all pads.  Therefore we now
do all thermal reliefs, then all spokes, then all clearances.

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

Fixes: lp:1782957
* https://bugs.launchpad.net/kicad/+bug/1782957
2019-06-25 11:34:27 +01:00
jean-pierre charras 29ca96cfe7 Gerber drill file: Modify a aperture attribute for oblong holes (slots).
Oblong holes (slots) use now a aperture attribute similar to round holes.
(The previous attribute "slot" is now deprecated)
However they have a specific aperture, and a comment is added in drill files for these apertures.
2019-06-25 09:43:29 +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
Seth Hillbrand ec3158d03a pcbnew: Don't clear module flags on revert
The RebuildSelection routine now handles updating the selection based on
flags.

Fixes: lp:1831881
* https://bugs.launchpad.net/kicad/+bug/1831881
2019-06-24 10:26:37 -07:00
Seth Hillbrand 0bce0f37e4 pcbnew: Avoid wxassert in message
wxstring::Printf() needs size_t cast to acceptable type or it gives an
assertion in debug mode.

(cherry picked from commit e8ce0ba6ef)
2019-06-24 09:42:40 -07:00
Wayne Stambaugh 15e6bcc86b Footprint library nickname comparison fixes.
Footprint library nicknames are case sensitive but the comparison for
the library tree control was case insensitive.

Also make the footprint name comparisons case sensitive as well.  While
not strictly necessary, the plan is to start using the name defined in
the footprint file instead of the file name which will allow for case
sensitivity.

Fixes lp:1833701

https://bugs.launchpad.net/kicad/+bug/1833701
(cherry picked from commit d8fff5c820)
2019-06-24 08:03:28 -04:00
Seth Hillbrand 251e0ca19c Minor bug fix to zones
On linux, m_brdOutlinesValid initialized to "true" which prevented
non-copper zones from filling correctly
2019-06-22 10:56:37 -07:00
Seth Hillbrand 1ece1172c5 pcbnew: Ensure save dialog with zones
Fixes: lp:1833748
* https://bugs.launchpad.net/kicad/+bug/1833748

(cherry picked from commit febc8cd6aa)
2019-06-22 08:55:23 -07:00
jean-pierre charras c8c318510e Pcbnew, zones filler: fix a bug I introduced in my commit b1803bc. 2019-06-22 16:41:20 +02:00
jean-pierre charras b1803bcf02 Pcbnew, zones filled: fix incorrect clipping of filled areas outside the board outlines.
fix also an other minor issue: these filled areas were slightly too large.
2019-06-22 09:55:57 +02:00
Seth Hillbrand 3bd2b7762a Fixup previous move commit
The previous commit missed a case where the number was so large that it
overflowed the integer invalidating the comparison.  This protects
against that case by using floating point comparison.

(cherry picked from commit f25ae373bb)
2019-06-20 06:48:10 -07:00
Seth Hillbrand 4a18f9db3a pcbnew: Enforce maximum movement in Move Exact
This checks the movement against a maximum value that would place the
selection outside of the valid area for the footprint or board.

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

(cherry picked from commit 845833e8fd)
2019-06-20 06:40:33 -07:00
Seth Hillbrand 77cefe0c16 Normalize line endings
A few files snuck in with CRLF for the line endings.  These make it hard
to look at diffs as every line appears to have changed.  This commit
makes only line ending changes, so can be ignored
2019-06-19 15:18:30 -07: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
Seth Hillbrand 1ef2f84f72 Update toolbar to get new icon/tooltip
After a save-as the footprint belongs to the library, we need to refresh
the toolbar to get the correct icon.

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

(cherry picked from commit ba97494d6f)
2019-06-18 19:25:15 -07:00
Jeff Young c8f254ff92 Don't deselect on activate event; only cancel events.
Fixes: lp:1833268
* https://bugs.launchpad.net/kicad/+bug/1833268
2019-06-19 00:19:45 +01:00
Jeff Young aaa7661b94 Check that there's something selected in the tree before exporting.
Fixes: lp:1833295
* https://bugs.launchpad.net/kicad/+bug/1833295
2019-06-18 21:50:53 +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 bc26ccf9f2 pcbnew: Correct polygon flipping in custom pads
Custom pads are referenced to the anchor pad 0-point, so flipping the
polygon should be about 0 and not the flip point.

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

(cherry picked from commit 909a25c147)
2019-06-17 15:27:50 -07:00
Seth Hillbrand 1956c074ba Fix import graphics routines and tests
The returns of KiCad file extensions on GTK contain basic regex matching
case-insensitive file extensions.  We need to match these in the
provider and tests
2019-06-17 14:59:39 -07:00
Jeff Young 7cfe19d9fd Cleanup. 2019-06-17 22:15:20 +01: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
jean-pierre charras 8085899d0a Pcbnew: better approximation of arcs by polygons for pads having a very small size.
Especially, small round rect pads have a ugly shape because the number of segments is
small and the 90 deg arcs are not very well approximated.
The minimal seg count for 90 deg arcs is now 4 (16 segm/circle) for pads.

Fixes: lp:1833005
https://bugs.launchpad.net/kicad/+bug/1833005
2019-06-17 17:26:15 +02: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 37afcd93e2 pcbnew: Fix missing correction to Pad->Polygon transform
The rounded radius needs to be corrected even when there is no clearance
to ensure that the pad segments fall on the arc.
2019-06-17 05:28:52 -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
Jeff Young f30c8e0f46 Increase signal-to-noise ratio. 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
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
jean-pierre charras a076f5092c I18n: fix a few useless leading spaces in messages. 2019-06-16 20:29:11 +02: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
Jeff Young 6d335f2a82 While Seth fixed the main issue, repeated Activate() calls probably still aren't a good idea.
(The main issue was addressed here: 552815d48617c08a6ec29f22c7ecdf1906988e11.)
2019-06-16 11:03:56 +01:00
jean-pierre charras 18ffb405b4 better message in dialog 2019-06-16 09:13:17 +02:00
Jeff Young 0f4bdbd184 Tighten down the POINT_EDITORs a bit more. 2019-06-16 01:33:39 +01:00
Jeff Young f14e41133b OSX compiler didn't like the other syntax. 2019-06-16 01:06:18 +01:00
Jeff Young 945eaceb91 Try and keep POINT_EDITOR and SELECTION_TOOL from fighting with drawing tool.
Set the IS_NEW flags so the POINT_EDITOR doesn't try an poke its head
in, and apply the EE_SELECTION_TOOL hack for mouse clicks leaking
through to the underlying tools.

Fixes: lp:1832911
* https://bugs.launchpad.net/kicad/+bug/1832911
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
Seth Hillbrand 77643fe9b6 pcbnew: Restore select items filter
This restores the distinction between selecting tracks and selecting
items in the expand call.  It does not yet fully address lp:1832902
2019-06-15 10:08:36 -07:00
Seth Hillbrand 4f4b24a638 pcbnew: Draw dynamic ratsnest with curved lines
When selected, curved ratsnest lines can be used for all ratsnest not
just the static set.

Fixes: lp:1832929
* https://bugs.launchpad.net/kicad/+bug/1832929
2019-06-15 08:17:28 -07:00
Seth Hillbrand 79e2000af4 Fix case-sensitive import using KiCad std
Fixes: lp:1832853
* https://bugs.launchpad.net/kicad/+bug/1832853
2019-06-15 08:08:41 -07:00
Seth Hillbrand 2dd82cbca7 Revert the ClearIfOutside logic.
This workflow needs better indicators before it will be anything but
confusing.

Fixes: lp:1832714
* https://bugs.launchpad.net/kicad/+bug/1832714
2019-06-14 20:10:04 -07:00
jean-pierre charras f550ecaf1f Better tooltip and fix a typo. 2019-06-14 20:50:46 +02:00
Seth Hillbrand 51511eda85 CMake adjust Linux build
Instead of linking the same target name and re-building, we can install
the file to a new name.  This speeds the build process and keeps linking
routines from stepping on each other.  Available now that we are at
CMake 3.0.2

Fixes: lp:1789468
* https://bugs.launchpad.net/kicad/+bug/1789468
2019-06-14 11:01:17 -07:00
Seth Hillbrand 36f70704eb import_gfx: Make file selection case-insensitive
This adds the upper-case version of files names to the selection box for
filesystems that support case-sensitive file names.

Fixes: lp:1832853
* https://bugs.launchpad.net/kicad/+bug/1832853
2019-06-14 08:35:03 -07:00
Ian McInerney d5f680ecd2 Allow DXF to be exported in either inches or millimeters
Fixes: lp:1832188
* https://bugs.launchpad.net/kicad/+bug/1832188
2019-06-13 15:18:20 -07:00
Ian McInerney b2c848579a pcbnew: Update plot dialog to contain a unit selector for DXF 2019-06-13 15:18:07 -07:00
Seth Hillbrand fb3d1bdb59 Clear some compile warnings 2019-06-13 15:16:54 -07: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 517c79c9cd Don't require changes before enabling Export Footprint.
Fixes: lp:1832730
* https://bugs.launchpad.net/kicad/+bug/1832730
2019-06-13 16:28:39 +01:00
Jeff Young f0cd7a5fd9 Clean up duplicted Find action processing. 2019-06-13 15:51:32 +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 df08f9921f Make place drill origin and place grid origin one-shot commands.
Fixes: lp:1751747
* https://bugs.launchpad.net/kicad/+bug/1751747
2019-06-13 15:51:32 +01:00
Jeff Young ae8daee83c Don't let point editor interrupt other operations.
Fixes: lp:1832416
* https://bugs.launchpad.net/kicad/+bug/1832416
2019-06-13 15:51:32 +01:00
Seth Hillbrand daad58e511 pcbnew: Add option to show ratsnest while moving
Re-works ratsnest display options in the configuration parameters rather
than the board file.  Moves ratsnest options to central preferences
location.

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

Fixes: lp:1821183
* https://bugs.launchpad.net/kicad/+bug/1821183
2019-06-12 17:36:02 -07:00
Tomasz Włostowski 51b9319246 pcbnew: updated connectivity algorithm to support JP's no-outline zones 2019-06-12 20:57:31 +02:00
Seth Hillbrand 0571ff6ce2 pcbnew: Centralize selection clearing
Also adds check for items before getting BBox.

Fixes: lp:1832601
* https://bugs.launchpad.net/kicad/+bug/1832601
2019-06-12 09:06:23 -07:00
Seth Hillbrand e691704a82 pcbnew: Edit when cursor in in selection
Prevents certain edit tools from handling the action unless the cursor
remains inside the selection bounding box.

For now this is a UX test but the behavior may be expanded into Eeschema
as well.

Fixes: lp:1827242
* https://bugs.launchpad.net/kicad/+bug/1827242
2019-06-12 05:28:48 -07:00
Jeff Young 2348537769 Add a command to toggle between last two highlighted nets. 2019-06-12 12:43:12 +01: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
Seth Hillbrand 60b98a8b4f Suppress non-Mac warning
The return variable is unused, so passing the pointer to a null lambda
drops the warning without incurring compile penalty.
2019-06-11 10:12:00 -07:00
Seth Hillbrand 32052d953f pcbnew: Fix STL blunder when deleting
Deleting objects from a container will invalidate the iterator that
contains the object.  Correct deleting requires capturing the iterator
returned by the erase function.

Fixes: lp:1832331
* https://bugs.launchpad.net/kicad/+bug/1832331
2019-06-11 10:12:00 -07:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
John Beard 9625cea57f Fix hotkey debug spew
Two issues:

* Unassigned hotkeys were being passed to WX in the menu strings as
  "<unassigned>". WX doesn't recognise this, and prints debug each time.
  Unassigned hotkeys are no longer rare or naughty, so we shouldn't provoke
  debug spew. Suppress by not appending hotkey strings for actions with 0
  (i.e. unassigned) hotkey IDs.
* The zone cutout tool uses GR_KB_SHIFT, not MD_SHIFT. This causes
  "unknown hotkey" spew from WX.
2019-06-11 14:40:57 +01:00
John Beard 1e4abac579 Fix multiple compilation issues on Linux
* Circular gal<->common dependency bites again. Add 'common'
  again to the 'kicad' target's link libraries. libgal.a depends
  on SHAPE_POLY_SET in common, but common depends on gal. This is
  not a real fix, but it unsticks Linux compilations. Fixing the
  circular dep is an existing bug: https://bugs.launchpad.net/kicad/+bug/1832229

* Missing LEGACY_HK_NAME for ACT_EndTuning: this was probably accidentally
  allowed on some other platform due to different wxString constructors.
  On Linux/GCC, it breaks.

* Unused include from /kicad in export_vrml.cpp. This is not findable
  on Linux, as pcbnew does not include the right dirs for this to be
  found. But it's not used, so just remove it.
2019-06-11 13:58:38 +01:00
Jeff Young 9f427da56f Use the ACTION_ID offset when updating the layer pair bitmap. 2019-06-11 09:13:56 +01:00
Jeff Young b36f982272 Fix typo introduced in DLIST erradication.
Fixes: lp:1832030
* https://bugs.launchpad.net/kicad/+bug/1832030
2019-06-11 01:00:43 +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 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 31ee95c683 Reconcile tool and menu for Enumerate Pads.
Fixes: lp:1831950
* https://bugs.launchpad.net/kicad/+bug/1831950
2019-06-10 23:46:01 +01:00
Jeff Young bb96255a03 Fix dangerous static_cast-ing to wrong type. 2019-06-10 23:46:01 +01:00
Jeff Young 1f6a5c92d7 Make sure placement menu has a pointer back to its tool.
Fixes: lp:1831730
* https://bugs.launchpad.net/kicad/+bug/1831730
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 193ec692a9 Follow naming conventions. 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
Seth Hillbrand 0035445456 pcbnew: Allow DRC violations when marked
We shouldn't consider any obstacles when we are routing in DRC violation
mode.

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

(cherry picked from commit 3b3165ad51)
2019-06-09 13:03:08 -07:00
jean-pierre charras 929b1a1275 Better message for translation. 2019-06-09 17:53:03 +02:00
Seth Hillbrand 4a52062a54 GAL: Make high-contrast meld into background
This mixes the de-emphasized layers into the background color rather
than merely a black color.  This also keeps some of the original layer
color.

Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316
2019-06-09 08:16:58 -07:00
Seth Hillbrand b75017830f modedit: Clear undo when importing
Importing a footprint is creating a new board.  Undo breaks here as we
don't maintain undo/redo across boards.

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

(cherry picked from commit 5ce0e7265b)
2019-06-08 19:48:28 -07:00
Seth Hillbrand 81c5ba257b pcbnew: Ensure cursor remains set during tool activity
Mouse capture end is called by some actions such as save board.  This
resets the cursor image but doesn't change the current tool.  Resetting
the cursor image during action prevents this.

(cherry picked from commit 35e87128f5)

Fixes: lp:1831888
* https://bugs.launchpad.net/kicad/+bug/1831888
2019-06-08 10:25:24 -07:00
Seth Hillbrand 23f9d4642d pcbnew: Add tooltip explaining limits on Import Vector Graphics
The tooltip is shown when selecting a file.  Explains that fonts and
bitmaps will be ignored by the conversion.
2019-06-08 09:43:12 -07:00
Seth Hillbrand f7550940ee Import Vector Dialog formatting
This standardizes the import vector graphics file dialog to use the
sbSizer titles instead of bold+lines.  Tooltip changes will be in the
next change as we don't change strings for bugfix releases and this
commit is targeted for 5.1.3

Fixes: lp:1823462
* https://bugs.launchpad.net/kicad/+bug/1823462
2019-06-08 09:36:40 -07:00
Seth Hillbrand a75dd7f48c pcbnew: Fix error when exporting GenCAD
The qsort routine acted on void**, when it was replaced with the
std::sort, the signature should have changed as well.
2019-06-07 11:09:06 -07:00
jean-pierre charras b0182abbb5 Custom pads: fix a bug when plotting the custom shape.
This bug was seen only with some shapes, not all, and only for layers having a negative margin.

Fixes: lp:1831941
https://bugs.launchpad.net/kicad/+bug/
2019-06-07 10:50:40 +02:00
jean-pierre charras f1f26a9197 drc_clearance_test_functions.cpp: remove a stupid "optimization code" that creates broken tests (sorry to be rude)
Fixes: lp:1831776
https://bugs.launchpad.net/kicad/+bug/1831776
2019-06-06 13:13:37 +02:00
Seth Hillbrand 90f06c56a9 Add mutex to connectivity
We were piggy-backing on the includes from previous files that no longer
have mutex.
2019-06-05 15:55:52 -07: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
Jeff Young 64b18ea06a Use qualified window names when searching for 3D viewers.
Just searching in children didn't work because the windows aren't
actually in the child window lists.

Fixes: lp:1831774
* https://bugs.launchpad.net/kicad/+bug/1831774
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
jean-pierre charras e75be4074e Pcbnew: finalize the new zone filling algo (filled polygons with no thickness). 2019-06-05 18:36:20 +02:00
qu1ck 3cb90063a1 Pcbnew scripting fixes
* Remove infinite recursion calls in footprint.i
* Extend DRAWINGS deque iterator to auto cast contained BOARD_ITEMS,
similar to what dlist implementation did.
2019-06-04 19:29:31 -07:00
Seth Hillbrand f007d2857a pcbnew: ClearPcb() without queuing tools
When exiting pcbnew, we only want to run the sections of ClearPcb that
remove the old pcb data.  We do not want to queue events that handle
initializing a new pcb.  These were caught after freeing memory in some
cases, leading to segfaults.

Fixes: lp:1831560
* https://bugs.launchpad.net/kicad/+bug/1831560
2019-06-04 19:27:17 -07:00
Jeff Young 15241b7fcf ACTION-ize toolbar/palette control. 2019-06-04 22:31:42 +01:00
Jeff Young 1222f3cc72 ACTION-ize fab outputs. 2019-06-04 22:31:42 +01:00
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +01:00
jean-pierre charras eb1faebf1f Pcbnew: prepare the new zone filling algo (filled polygons with no thickness). Work in progress. 2019-06-04 21:24:24 +02:00
Jeff Young 0ea75cb4e7 Another attempt to fix build failure. 2019-06-04 16:26:45 +01:00
Jeff Young e3c1235572 Fix link issue with qa_pcbnew test.
I'm not terribly happy about the solution as it's a bit less safe.
But it's what we had before.
2019-06-04 15:09:18 +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 4e11dcfa31 Better error reporting for board edge collisions. 2019-06-04 13:56:54 +01:00
Jeff Young fbfbb64387 A bit of cleanup of stale DRC code. 2019-06-04 13:56:54 +01:00
Jeff Young ea3c29e3ec Now that we allow multiple 3DViewers, we need to make sure we have the right one.
Note that FindWindow() searches children, whereas FindWindowByName() searches
all windows.
2019-06-04 13:56:54 +01:00
jean-pierre charras 34ccd0f004 Pcbnew: prepare the new zone filling algo (filled polygons with no thickness). Work in progress. 2019-06-04 09:39:17 +02:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +01:00
Jeff Young 584ed9e204 Add files accidentally left out of last commit. 2019-06-04 00:51:16 +01:00
Jeff Young 59a01789ff Show board info in status bar when seleciton isn't a single object.
Fixes: lp:1831402
* https://bugs.launchpad.net/kicad/+bug/1831402
2019-06-03 21:52:59 +01:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00
Jeff Young d7574db805 Fix regression in dialog-avoidance when focusing on a location. 2019-06-03 21:08:30 +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
jean-pierre charras be54f357eb Better tooltip, more easy to translate 2019-06-03 18:27:17 +02:00
Seth Hillbrand 95ab0b1813 pcbnew: Hide dynamic ratsnest after canceling edit
The dynamic ratsnest is shown while moving items but this needs to be
hidden after cancelling.  Previously this was handled by the
SelectionClear event but we've changed this to (correctly) keep the
previous selection when canceling.

Fixes: lp:1831350
* https://bugs.launchpad.net/kicad/+bug/1831350
2019-06-02 20:25:02 -07:00
Seth Hillbrand 1f30d0c803 pcbnew: remove the last dlist components from pcbnew 2019-06-02 20:06:11 -07:00
Seth Hillbrand 99756efea5 Use GetFirstModule() for call that can be NULL 2019-06-02 20:06:11 -07:00
Ian McInerney cbea5149cb pcbnew: Cleanup context menu ordering 2019-06-02 21:10:56 +01:00
Jeff Young da4fe27447 More ACTIONS work. 2019-06-02 21:10:56 +01:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +01:00
Jeff Young 6ac273264d Move Show3DViewer to common action. 2019-06-02 16:21:44 +01:00
Ian McInerney 208a8553a5 pcbnew: Add context menu to measure tool
Fixes: lp:1831063
* https://bugs.launchpad.net/kicad/+bug/1831063
2019-06-02 07:55:29 -07:00
Seth Hillbrand 63fb408478 pcbnew: Don't modify the board lists outside of class
We should not be updating the board lists without using the class_board
methods.

Fixes: lp:1831370
* https://bugs.launchpad.net/kicad/+bug/1831370
2019-06-02 07:30:17 -07:00
jean-pierre charras 17b18637f8 Fix a compil issue on msys2: %zu format does not exist on msys2 2019-06-02 14:37:37 +02:00
Jeff Young 45a9544726 Instantate a default menu from no selection when menu is first built.
This might resolve some of the GTK menu anomalies.
2019-06-02 12:58:08 +01:00
jean-pierre charras 072fc4f8cb DIALOG_COPPER_ZONE: minor cosmetic change. 2019-06-02 11:50:46 +02:00
qu1ck 41a9546b3d Pcbnew: fix crash in netlist updater 2019-06-01 21:02:16 -07:00
Seth Hillbrand 6a45446496 pcbnew: Remove the last dlist from modules/pcbnew 2019-06-01 20:55:32 -07:00
Seth Hillbrand b244a940ef pcbnew: Fix crash in modedit saving 2019-06-01 19:44:29 -07:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Jon Evans f49779465e Fix broken build in array_creator 2019-06-01 16:30:58 -04:00
Seth Hillbrand 3fb8963536 pcbnew: Cleanup tracks and vias rework
Fixes a few commit issues based on the std:: rework.  Add an option to
delete tracks fully in pads and makes merge tracks smarter

Fixes: lp:1787190
* https://bugs.launchpad.net/kicad/+bug/1787190
2019-06-01 09:53:23 -07:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand 961b22d603 pcbnew: Changing drawings from dlist to std::deque 2019-06-01 09:51:57 -07:00
Jeff Young 296ec66796 Cosmetic cleanup in preference panels. 2019-06-01 16:29:12 +01:00
Jeff Young 74e10791ff Fix some Mac-specific issues with the Preferences... menu item. 2019-06-01 16:29:12 +01:00
Jeff Young f67df4bf11 Collapse ARRAY_CREATOR into single class now that legacy instance is gone.
Also removes AllowLegacyCanvas ADVANCED_CONFIG option.
2019-06-01 16:29:12 +01:00
Jeff Young c1298570cb Remove legacy routing options. 2019-06-01 16:29:12 +01:00
Jeff Young 69e60d3982 Make sure grid settings get set in new canvas when switching. 2019-06-01 01:57:24 +01:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
Jeff Young ed9153a786 Fix assert launching PCBNew. 2019-06-01 00:06:25 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young edc8438ef0 Start the process of removing the legacy draw panel. 2019-05-31 21:54:21 +01:00
jean-pierre charras 30ad8e9369 Pcbnew, file menu: fix missing initialization of Append Board menuitem 2019-05-31 18:28:31 +02:00
Jon Evans d0926cce58 PcbNew: prevent crash in point editor if selection gets invalidated 2019-05-29 21:27:59 -04:00
Seth Hillbrand eb0fc7bae2 Re-connect switch canvas on startup 2019-05-29 15:29:36 -07:00
Seth Hillbrand 218bea9ace pcbnew: Fix crash in find dialog
Tool manager is not exposed to the dialogs, we need to reference it
through the parent frame.

Fixes: lp:1830942
* https://bugs.launchpad.net/kicad/+bug/1830942
2019-05-29 15:05:38 -07:00
jean-pierre charras 48899a4c96 Fix incorrect tooltip. 2019-05-29 21:33:05 +02:00
Seth Hillbrand e7e20b85b5 Don't change the board without user action
Grid and ratsnest visibility are stored in the board file and should not
be changed without the user explicitly modifying them.

In the future, we'll move these settings out of the board file but we
shouldn't cause extra file-churn for flipped bits.

Fixes: lp:1828285
* https://bugs.launchpad.net/kicad/+bug/1828285
2019-05-29 11:25:44 -07:00
Jon Evans 4d8be7b2bb PcbNew: ensure Bezier points are updated before plotting 2019-05-29 00:17:34 -04:00
Jon Evans adfc4d2485 PcbNew: fix Bezier curves not having bounding boxes at startup 2019-05-29 00:17:34 -04:00
Seth Hillbrand cdaba24f0d pcbnew: Remove some legacy code
The menu IDs were used for disambiguation in legacy canvas.
2019-05-28 20:33:17 -07:00
Seth Hillbrand 453eb9c3eb pcbnew: Reconnect Grid settings dialog
Connects using the new common grid settings ID
2019-05-28 20:32:40 -07:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young 9d29e94cb5 Remove some more legacy code. 2019-05-29 00:26:29 +01:00
Jeff Young 0260b32125 Push resetLocalCoords down into COMMON_TOOLS.
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young a27e4246e0 Move some more menu commands to ACTIONs. 2019-05-29 00:26:29 +01:00
Jeff Young c0909611d3 Remove a bunch more legacy editing code. 2019-05-29 00:26:29 +01:00
Seth Hillbrand f59a2410fa pcbnew: Check netlist settings in proper spot
We have _two_ settings that independently control whether the netlist is
updated by timestamp.  One in the NETLIST object and one in the
NETLIST_UPDATER object.  It looks like we are phasing one out but the
commit was not complete.

Fixes: lp:1828754
* https://bugs.launchpad.net/kicad/+bug/1828754
2019-05-28 14:21:25 -07:00
Seth Hillbrand 10b0b18d80 netlist: Update via netnames
Vias may need to have their netnames updated because floating vias do
not get a connectivity push.

Fixes: lp:1830102
* https://bugs.launchpad.net/kicad/+bug/1830102
2019-05-28 12:14:42 -07:00
Michael Kavanagh 27d097a78c Stop PNS router settings from being overwritten when switching modes
Fixes: lp:1824967
* https://bugs.launchpad.net/kicad/+bug/1824967
2019-05-27 16:10:00 -07:00
Jeff Young 50d2aaa97c Fix copy/paste typos in undo/redo. 2019-05-27 22:17:22 +01:00
Jeff Young ce4c4c9409 Fix crash in PCBNew undo from uninitialized variable. 2019-05-27 18:58:36 +01:00
Jeff Young 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47:20 +01:00
Jon Evans 3625668ff5 PcbNew: Fix ordering of fab and courtyard layers
Fixes: lp:1829511
* https://bugs.launchpad.net/kicad/+bug/1829511

(cherry picked from commit eb4aded5d6)
2019-05-27 13:06:26 -04:00
Jon Evans cfe588a853 Prevent unbalanced PTH pad labels from being hidden by drills
Fixes: lp:1829067
* https://bugs.launchpad.net/kicad/+bug/1829067

(cherry picked from commit 5230f45658)
2019-05-27 13:06:26 -04: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 e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Jeff Young 2502bce987 Move quit back to wxIDs. wxWidgets like to muck around with the location on OSX. 2019-05-27 11:58:55 +01:00
Jeff Young 6936effaa7 Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Jeff Young bdd44ce88c Use consistent PageLayout data structure names. 2019-05-27 11:55:58 +01:00
Jon Evans 638ac3838c PcbNew: Fix layer alpha overrides being overwritten by color changes
Fixes: lp:1827518
* https://bugs.launchpad.net/kicad/+bug/1827518

(cherry picked from commit cb3edf2607)
2019-05-26 20:20:53 -04:00
Jon Evans e156e4509c Report actual intersection position for crossing tracks
Fixes: lp:1825588
* https://bugs.launchpad.net/kicad/+bug/1825588

(cherry picked from commit f101934909)
2019-05-26 13:03:23 -04:00
Jon Evans 549b76739e Exclude invisible items from view bounding box for zoom-to-fit
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457

(cherry picked from commit ede2575018)
2019-05-26 13:03:23 -04:00
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Seth Hillbrand 0a668ee550 pcbnew: Remove segment count from board file
This removes the setting for number of segments per circle from the zone
definition.  All segment counts are handled by absolute error allowed.
2019-05-24 21:13:53 -07:00
Jon Evans 52a9e68093 Store items changed by connectivity algorithm in undo list
Fixes: lp:1828442
* https://bugs.launchpad.net/kicad/+bug/1828442

(cherry picked from commit fb80ee5a0e)
2019-05-24 21:56:37 -04:00
Michael Kavanagh 741140e4a4 Fix footprint marked as modified when layer visibility changed
Fixes: lp:1830330
* https://bugs.launchpad.net/kicad/+bug/1830330
2019-05-24 16:13:22 -04:00
Seth Hillbrand 7058b79bf1 pcbnew: Fix assert in debug build
Previously we saved the visibility as a mask of 32bits and the check was
needed.  These are now saved as per-layer setting, so the assert is
extra.
2019-05-24 12:39:01 -07:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Wayne Stambaugh 816f6db310 Pcbnew: Python scripting support clean up.
Always check the return value of PyRun_SimpleString() for errors when a
Python script is run and show an error message rather than fail silently.

Enable Python interpreter I/O redirection in debug builds so that script
string errors will be shown when PyRun_SimpleString() is called.

Do not call PyErr_Print() after a PyRun_SimpleString() call failure.  It
doesn't do anything useful.

Do not call Py_Finalize() after a PyRun_SimpleString() call failure.  It
seems to cause Pcbnew to crash.
2019-05-24 07:32:38 -04:00
jean-pierre charras ce93934f08 Pcbnew, ZONE_FILLER: fix incorrect test to remove filled areas outside the board edge cuts.
This incorrect test was only for zones with no net.
2019-05-23 20:22:03 +02:00
Ian McInerney 0daf14f9c3 pcbnew: Fixed listing of 3D libraries in the github wizard
Fixes: lp:1830137
* https://bugs.launchpad.net/kicad/+bug/1830137
2019-05-23 09:50:05 -07:00
jean-pierre charras 75cea18f07 Pcbnew, toolbars: fix incorrect icons 2019-05-23 11:07:55 +02:00