Commit Graph

6594 Commits

Author SHA1 Message Date
Seth Hillbrand 462549fc84 modedit: Add hotkey to switch arc posture
Allows switching arc clockwise/counterclockwise orientation while
drawing in module editor.

Fixes: lp:1777524
* https://bugs.launchpad.net/kicad/+bug/1777524
2018-06-19 09:42:04 -07:00
Maciej Suminski 81a5c0e3bf GAL: Show ratsnest lines when dragging
GAL is strict regarding which layers are rendered, therefore to show
ratsnest lines when an item is dragged - the ratsnest layer must be kept
enabled. Ratsnest line visibility is enabled per item and this is the
way to show/hide the lines.

Fixes: lp:1666473
* https://bugs.launchpad.net/kicad/+bug/1666473
2018-06-19 11:29:36 +02:00
Maciej Suminski f0b3cf8077 STEP export: Stricter contiguity check
Stricter contiguity check points the user to gaps in the outline.

Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
2018-06-19 10:36:21 +02:00
Seth Hillbrand 44c1f5785b pcbnew: Set dp clearance based on netclass
Minimum differential pair clearance should be limited to the netclass
differential pair spacing.  This also cleans up some unused code that
was left over from previous work on differential pair clearances.

Fixes: lp:1673632
* https://bugs.launchpad.net/kicad/+bug/1673632
2018-06-18 14:23:25 -07:00
Jeff Young feebb3a36c Don't double-move module text when parent is also selected.
Fixes: lp:1776871
* https://bugs.launchpad.net/kicad/+bug/1776871
2018-06-18 22:03:39 +01:00
Wayne Stambaugh 11c248a463 Fix a typo made in commit 52734058. 2018-06-18 14:57:01 -04:00
Wayne Stambaugh 52734058a7 Remove string translation wrappers used in commit 94891b75.
Translating internal file name and path strings will almost certainly
result in a bug on MacOS.
2018-06-18 12:14:48 -04:00
Adam Wolf 94891b75f9 Handle STEP export properly on MacOS when launched from standalone pcbnew. 2018-06-17 13:09:33 -04:00
Andrzej Wolski a99eeb44d3 Do not allow setting zero Y size for oval holes 2018-06-17 16:30:14 +02:00
Andrzej Wolski 834d9335dd Do not plot zero width oval holes in Gerber X2 drill files
In case there are zero width oval holes on the PCB,
it is safer to not plot them at all, rather than plotting
with width arbitrarily increased to 10 mils.
This also makes Gerber outputs consistent with Excellon outputs.
2018-06-17 16:26:23 +02:00
Seth Hillbrand 4959f91dac pcbnew: Ensure Connectivity RTree gets updated
When removing items, we perform a two-pass removal, checking first
for the cached rectangle collision.  Then, if we do not find the item
being removed, we perform a second, more expensive pass over the full
tree.  This second pass is required as we cannot be certain that an
item's bbox has not been modified between insertion and deletion.  In
which case, keeping stale pointers in the tree will lead to segfaults.

Fixes: lp:1777246
* https://bugs.launchpad.net/kicad/+bug/1777246
2018-06-16 21:45:55 -07:00
Maciej Suminski 7b7355772e Do not display Interactive Routing Settings dialog twice
The dialog was displayed due to a global TOOL_ACTION and a hotkey
assigned to a top menubar entry. Removing the hotkey from the menubar entry
is not ideal, but less irritating than a dialog showing up twice.
2018-06-15 17:32:00 +02:00
Maciej Suminski 583a9c08c0 Remove duplicated PNS TOOL_ACTIONs to display routing settings 2018-06-15 17:12:15 +02:00
Maciej Suminski 94b6f848bb pcbnew_control.cpp: change C-style asserts to wxCHECK/wxFAIL 2018-06-15 17:11:32 +02:00
Maciej Suminski eb97634bdf Enable 'Delete Item' toolbar icon in the Footprint Editor when the tool is active 2018-06-15 17:10:12 +02:00
Maciej Suminski 7d66dc0cc3 Fixed an assert on pasting items in the Footprint Library Editor
The assert in the title line verifies that an item does not belong to
any DLIST when it is being added to one. Items in clipboard are already
owned by DLISTs, therefore they need to be removed from the original
DLISTs before being added to new ones.
2018-06-15 14:35:55 +02:00
Andrzej Wolski 316ff2898d Fix footprint selection
Commit 72b49acc changed behavior of MODULE::ViewBBox(),
which now includes text fields area. This caused problems
with selecting footprints with relatively large text fields.
This patch fixes this problem by using MODULE::GetBoundingBox instead.

Fixes: lp:1776942
* https://bugs.launchpad.net/kicad/+bug/1776942
2018-06-14 19:32:09 -07:00
Wayne Stambaugh b82bf7c449 Fix minor layout issue in keepout area properties dialog. 2018-06-14 11:12:34 -04:00
Jeff Young b37969f584 Reset tools before switching footprints.
Fixes: lp:1776777
* https://bugs.launchpad.net/kicad/+bug/1776777
2018-06-14 09:55:29 +01:00
Seth Hillbrand 11ab8f6dc1 pcbnew: Fix a couple of duplicate hotkeys 2018-06-13 22:53:06 -07:00
Seth Hillbrand 4dd2de9057 pcbnew: Prevent mouse capture after actions
After an action is completed that required the screen to pan when the
cursor reaches the edge of the screen, we should release the cursor to
allow the user to move their mouse without panning.

Fixes: lp:1763860
* https://bugs.launchpad.net/kicad/+bug/1763860
2018-06-13 14:05:32 -07:00
John Beard 34c6393b71 Pcbnew Python docs: remove obsolete Doxygen parameters
These two parameters were unused and were producing warings:

* XML_SCHEMA
* XML_DTD
2018-06-13 11:12:24 -04:00
John Beard 41d6fc648d Pcbnew Python: use python super for inherited classes 2018-06-13 11:12:15 -04:00
John Beard 1f04b5fc7d Pcbnew Python: Add PadArray module documentation 2018-06-13 11:12:08 -04:00
John Beard 468d26d9d1 Pcbnew Python: Add plugin documentation
This adds the Python plugin helper classes to the generated
documentation.
2018-06-13 11:12:02 -04:00
John Beard 939450856a Pcbnew FP wizard: add rounded and chamfered box aids
These functions are fairly common drawing operations that otherwise
require fairly complex calculations, which would be better not to
have to repeat.
2018-06-13 11:11:55 -04:00
John Beard 5001b056ac Pcbnew FP wizard: add docstring for parameters
Adds more verbose and complete explanations of the
FootprintWizardBase and FootprintWizardDrawingAids functions.
2018-06-13 11:11:49 -04:00
John Beard 137799165d Pcbnew FP wizard: minor style fixes
This contains only a few minor style fixes according to PEP8
for FootprintWizardBase.py, and some spelling fixes
2018-06-13 11:11:42 -04:00
jean-pierre charras 9302bbce59 Pcbnew: fix a duplicate hotkey (E for edit properties) 2018-06-13 09:46:22 +02:00
Seth Hillbrand bc7bd107d9 Fix a number of untranslated strings. 2018-06-12 17:05:25 -07:00
Seth Hillbrand fb1aa56b77 modedit: Don't activate measure tool without a footprint
There's no risk in measuring an empty footprint but there's no benefit
either.  This matches the measure tool to the other, deactivated
footprint tools.
2018-06-12 16:48:59 -07:00
Seth Hillbrand 04706d9d02 pcbnew: Add placement hotkeys
Assigns configurable hotkeys to the placement commands.

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

Fixes: lp:1167895
* https://bugs.launchpad.net/kicad/+bug/1167895
2018-06-12 16:08:06 -07:00
Seth Hillbrand 47106b6861 pcbnew: Adding meander hotkeys to assignment
Allows increase/decrease spacing/amplitude hotkeys to be
assigned/changed.

Fixes: lp:94fb13aec
* https://bugs.launchpad.net/kicad/+bug/94fb13aec
2018-06-12 16:08:01 -07:00
Seth Hillbrand aae30cc7c1 pcbnew: Hotkey minor fixes
- Ordering of Hotkey list by function
- Use Hotkey assignment instead of hard-coded hotkey for length tuning
- Adjust default Length Tuning settings hotkey to CTRL-L so that we
don't overlap with "Lock" (overlaps are not editable)
2018-06-12 14:22:46 -07:00
Seth Hillbrand 70506cc31d pcbnew: Standardize HK display in Routing
Routing menu should display assigned hotkeys for all items, not just
route track.
2018-06-12 14:22:32 -07:00
jean-pierre charras cee313da8c Pcbnew: legacy canvas: make trace len display working while creating the trace.
Previously, the full trace length was always displayed as 0 during track creation in the info canvas.
2018-06-12 18:21:46 +02:00
Maciej Suminski 72b49acccf Commit supplementing 9605dd8e
Once SELECTION_TOOL has been changed to use EDA_ITEM::GetBoundingBox(),
selection area had to cover the footprint and its ref/value texts,
even hidden ones. To fix this, ref/val strings are taken into account
only in the ViewBBox().
2018-06-12 17:40:56 +02:00
Wayne Stambaugh ade3c2b129 Minor Python scripting documentation fixes.
Change the Doxyfile project name from KiCAD to KiCad.  It doesn't look
very good when we don't get the project name capitalization correct.

Clean up trailing whitespace in some of the helper scripts and Doxyfile.
2018-06-12 10:24:59 -04:00
Jeff Young 660aed71b4 Make sure initially loaded footprint is rendered.
Also sets the initial footprint to the current footprint when
doing a Choose Footprint from the Eeschema Edit Property
dialog.

Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-12 13:41:53 +01:00
John Beard 16411c8c1e Fix -Wparentheses in track_cleaner.cpp
Changes "wxBusyCursor( dummy );" to just "wxBusyCursor dummy;"

Fixes warning: ../pcbnew/tracks_cleaner.cpp:155:17:
warning: unnecessary parentheses in declaration of ‘dummy’ [-Wparentheses]
     wxBusyCursor( dummy )
2018-06-12 14:23:59 +02:00
Maciej Suminski 9605dd8e1d Fix selection clearance for via and tracks
- fixed via bounding box calculation in TRACK::GetBoundingBox()
- moved clearance to TRACK::ViewBBox()
- modified the Selection Tool to use EDA_ITEM::GetBoundingBox() rather
than VIEW_ITEM::ViewBBox() to determine selection

Fixes: lp:1776314
* https://bugs.launchpad.net/kicad/+bug/1776314
2018-06-12 10:59:30 +02:00
jean-pierre charras 5d276a43f6 PCB_EDIT_FRAME::EraseRedundantTrack() Fix incorrect detection of the new trace boundaries in a specific case.
It happens if the first segment of the new trace is inside a pad: the other segments are not found.
And the erased trace is not the right trace.

However this fix is more a workaround than a fix: currently the detection of the trace boundaries (BOARD::MarkTrace())
does not work very well for segments inside a pad.

Fixes: lp:1776121
https://bugs.launchpad.net/kicad/+bug/1776121
2018-06-12 10:05:12 +02:00
Seth Hillbrand 61c3bc4af4 pcbnew: Don't stage undo commits on new items
New items just being placed on the board are still temporary.  Although
we can modify their orientations/positions, we can't stage these changes
for undo/redo without corrupting the undo stack.

Fixes: lp:1776312
* https://bugs.launchpad.net/kicad/+bug/1776312
2018-06-11 16:43:30 -07:00
John Beard 896ad3774d "Select Connection" menus enablement
Previously, the "Select Connection" sub-items were greyed out when the
selection contained both tracks and vias. This meant that you couldn't
access "Select Copper Connection" when the selection contained both
tracks and vias (though the keyboard shortcuts did work).

Change to use SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::Tracks
) to allow any combination of track elements to be selected.

Fixes: lp:1772249
* https://bugs.launchpad.net/kicad/+bug/1772249
2018-06-11 10:58:26 -07:00
John Beard 0555bbc656 Pass PCB display settings to PNS router tool
This allows the tool to set display options like the clearance.

Fixes: lp:1766836
* https://bugs.launchpad.net/kicad/+bug/1766836
2018-06-11 10:48:05 -07:00
Jeff Young 8a2639325d Update footprint value when doing a Save As to library.
Fixes: lp:1570120
* https://bugs.launchpad.net/kicad/+bug/1570120
2018-06-11 14:43:32 +01:00
Jeff Young de7791cc8b Add context menu to footprint viewer for zoom & grid.
Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-11 11:37:48 +01:00
Jeff Young 5098c5796a Prevent another case of "fall behind" dialogs. 2018-06-09 00:51:39 +01:00
Seth Hillbrand c5c52c3dfd pcbnew Check for valid nodes before drawing ratsnest
We can invalidate a node by rotating.  Make sure that our endpoints for
the ratsnest are valid before attempting to draw.

Fixes: lp:1775727
* https://bugs.launchpad.net/kicad/+bug/1775727
2018-06-08 16:34:37 -07:00
Seth Hillbrand 68f6e3ad44 pcbnew: Differential pairs obey netclass settings
PNS routing options allow trace width to be chosen by the assigned
netclass.  This extends that to differential pair width/gap settings as
well.

Fixes: lp:1672126
* https://bugs.launchpad.net/kicad/+bug/1672126
2018-06-07 08:58:12 -07:00
jean-pierre charras 6d77e594b5 Python binding: fix pcbnew.Refresh() to make a better re-initialization.
Minor fixes in comments.

Fixes: lp:1775003
https://bugs.launchpad.net/kicad/+bug/1775003
2018-06-07 10:04:29 +02:00
Seth Hillbrand a5b92a1fe4 Constrain dimension tool while creating
The dimension tool is optionally constrained (MD_CTRL) while editing the
dimension.  This ensures same behavior for the creation step.
2018-06-06 17:04:28 -07:00
Seth Hillbrand 40d2535625 Recalculate ratsnest when moving footprint in legacy
Legacy shows the local ratsnest when moving a footprint.  Therefore we
need to recalculate it when the move ends.

Fixes: lp:1775473
* https://bugs.launchpad.net/kicad/+bug/1775473
2018-06-06 15:40:58 -07:00
Seth Hillbrand abd8927d71 Dimension Edit window passes default action
Processing enter from within the dimension editor window is only set to
the default action for top-level items.  Within the sizer, enter is
handled by the first registered button (Cancel) unless explicitly set.

Fixes: lp:1774035
* https://bugs.launchpad.net/kicad/+bug/1774035
2018-06-06 12:31:48 -07:00
Jeff Young 9552e02727 Handle description when reading netlist. 2018-06-06 01:59:56 +01:00
Jeff Young 271826f8f3 Fix crash when deleting from library with nothing selected.
Fixes: lp:1775289
* https://bugs.launchpad.net/kicad/+bug/1775289
2018-06-06 00:01:47 +01:00
Seth Hillbrand 9e4511eb11 Update netclasses when loading footprint
When clearing the pcb in footprint editor, we need to transfer the
netclass settings to ensure we have the correct defaults for the new
footprint.

Fixes: lp:1751583
* https://bugs.launchpad.net/kicad/+bug/1751583
2018-06-05 12:44:43 -07:00
jean-pierre charras 9354372a0c Fix bug: Pcbnew crash on invoking footprint browser when already open (happens only in some distros)
Fixes: lp:1775178
https://bugs.launchpad.net/kicad/+bug/1775178
2018-06-05 20:05:56 +02:00
Seth Hillbrand ee34aab07a Async hardening
There are three related changes here to harden our handling of threads
in the footprint async loader.

1) Footprint async loader explicitly aborts any remaining loader threads
on exit.

2) We protect the thread join by a mutex

3) We do not pause during no-wait routines
2018-06-04 15:08:40 -07:00
Seth Hillbrand 39ac5e0af8 Pcbnew: List nets fix calculation speed
Similar to 6e5726613, we need to find net node count quickly without
iterating over all items in the board.
2018-06-04 11:08:54 -07:00
Seth Hillbrand 5dbfa6a9c1 Correct node/pad count in pcbnew
Pads count all pads/pins on the board including unconnected and NPTH.
Nodes count only the pads that can connect to a net and are therefore
routable.  These were being calculated as the same number (displayed in
the info bar at the bottom of the screen)
2018-06-04 10:26:40 -07:00
Seth Hillbrand 63a952d239 Adjust connectivity to use RTree
Connectivity searches were slow for large, complex boards.  This was
partly due to the need to search all lists for possible connections
between anchors.

We remove this requirement by creating an RTree based on items' bounding
boxes similar to the PNS router.  Then we get both the colliding items
and search forward/backward to see if there are connections between the
anchors and the other item.

Because we use RTree, we no longer need the maintenance overhead of multiple
item lists and an anchor list in the connectivity class.

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

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

Fixes: lp:1761989
* https://bugs.launchpad.net/kicad/+bug/1761989
2018-06-04 08:30:07 -07:00
Maciej Suminski e4a6f2e523 Switch canvas to Cairo if OpenGL is not supported on the first run 2018-06-04 12:17:58 +02:00
jean-pierre charras 0b8cf93888 Pcbnew, On line DRC in legacy canvas: Fix broken Drc test during track and zone creation or edition.
It was broken by commit c78171d01f.
During creation, the Drc must only display a error message, and do not create markers.
Markers are created only during a full board DRC test.
commit c78171d01f replaced this behavior by a incorrect one (create markers and do not show error messages)
2018-06-04 11:20:11 +02:00
Maciej Suminski 8910894fab Enable the accelerated canvas on the first pcbnew run if requested
Fixes: lp:1769143
* https://bugs.launchpad.net/kicad/+bug/1769143
2018-06-04 10:41:34 +02:00
jean-pierre charras d3c41dd247 Remove dead code. 2018-06-03 19:55:03 +02:00
Seth Hillbrand 0a91f0bc9c Add 45º constraints to lines when moving with CTRL
Fixes: lp:1774750
* https://bugs.launchpad.net/kicad/+bug/1774750
2018-06-02 15:52:18 -07:00
Seth Hillbrand 975e777149 Fix threaded race condition in footprints
The progress reporter should not be cleared in the footprint
implementation to prevent dereferencing a NULL.

When cancelling the load, we should only allow setting of cancellation
to true to prevent a condition where the progress reporter resets
the cancellation.

Fixes: lp:1774777
* https://bugs.launchpad.net/kicad/+bug/1774777
2018-06-02 15:05:36 -07:00
jean-pierre charras 6e57266136 Pcbnew: optimize BOARD::SortedNetnamesList() for a must faster calculation time.
It is mainly used in copper zones dialog editor,
and previously created a noticeable delay to show this dialog with large boards (more than 900 nets)
2018-06-02 18:14:34 +02:00
Seth Hillbrand 3cf9009f73 Delete GL context in GL destructor not program
Also lock the DeleteAll call with mutext to protect threaded access.

The OpenGL contexts are removed when OPENGL_GAL class is destroyed.
Explicitly deleting all contexts prior to destroying the OPENGL_GAL
class causes an assert when the destructor tries to lock its context
prior to cleaning up OpenGL memory.  In most cases, an unhandled assert
in a destructor-called function will simply exit the destructor.

Python thread cleanup will also attempt to close the context.  This can
cause a race condition with multiple threads accessing/deleting the
canvas.

Fixes: lp:1774096
* https://bugs.launchpad.net/kicad/+bug/1774096
2018-06-01 09:14:36 -07:00
jean-pierre charras 9a228d8ec9 Gerbview: GAL mode: shows the page worksheet, similar to legacy mode. 2018-06-01 09:11:43 +02:00
Maciej Suminski 7c49bcd3a6 Clear selection before deleting DRC markers
Pcbnew crashes when a selected DRC marker is deleted. This a possible
fix to lp:#1773863.
2018-05-31 09:32:43 +02:00
Seth Hillbrand 3ce8a4856a Remove ToLayer_ID calls from color checks
Colors are assigned to virtual layers while the ToLayer_ID returns a
physical layer enum.  The GetLayerColor/SetLayerColor take LAYER_NUM
(int) values that can be larger than the physical layer count.
2018-05-30 13:51:20 -07:00
Jeff Young d90d4ff682 Fix bugs in Export to SVG.
We were trying to handle aOnlyOneFile at two different levels
which was preventing the Silk layer from going through the
right routine (and preventing board outlines from getting
drawn if selected).

We were also overwriting the references color local variable
before using it, meaning the reference was always rendered in
the value's color.

Fixes: lp:1774171
* https://bugs.launchpad.net/kicad/+bug/1774171
2018-05-30 20:49:05 +01:00
jean-pierre charras ce9cc4ea38 plot board: fix a stupid bug created by commit dfa91752 2018-05-29 19:51:50 +02:00
Maciej Suminski c5f56ef573 Eagle PCB import: made warning strings translatable 2018-05-29 15:02:26 +02:00
Maciej Suminski d2436e7478 Corrected "Add footprint library" dialog file filters
Fixes: lp:1773969
* https://bugs.launchpad.net/kicad/+bug/1773969
2018-05-29 15:02:26 +02:00
jean-pierre charras dfa9175209 Fix incorrect mask size for rectangular and trapezoid pads.
Fixes: lp:1773926
https://bugs.launchpad.net/kicad/+bug/1773926

Fixes: lp:1773961
https://bugs.launchpad.net/kicad/+bug/1773961
2018-05-29 13:45:45 +02:00
Jeff Young a12b9db584 Map Eagle values to fab layers.
Fixes: lp:1773256
* https://bugs.launchpad.net/kicad/+bug/1773256
2018-05-28 20:37:52 +01:00
jean-pierre charras da66005254 Pcbnew, plot dialog: avoid slightly change in hpgl pen diameter (due to inch/mm conversion error) when the hpgl format is not selected 2018-05-26 17:36:07 +02:00
jean-pierre charras 7db88126c5 hpgl plot parameters: use double instead of int to store the pen diameter to avoid truncation.
This parameter, always in mm in a hpgl file, is for historical reasons stored in mils,
and using a int to store it created annoying rounding errors.
2018-05-26 09:37:42 +02:00
Seth Hillbrand da061718e5 Remove constraint on circle
Allows circle radius to snap to arbitrary points while editing

Fixes: lp:1773436
* https://bugs.launchpad.net/kicad/+bug/1773436
2018-05-25 12:30:47 -07:00
jean-pierre charras 250d958ebb Plot dialog: fix broken dialog management.
Previously, the dialog was created only once, with the current board setup and the current units selection.
Therefore, after changes in board or units, the dialog was really broken.

Now, the dialog is recreated when the plot command is run.
2018-05-25 19:48:07 +02:00
Jeff Young cd5f727880 Fix off-by-1 errors in zoom menus & use zoom steps in GAL canvas.
Also bumps the maximums a bit (at user request).

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-25 13:01:58 +01:00
Jeff Young b89f6d4af3 Decrease allowed coverage ration when zones are involved.
A perfect solution would create holes in the coverage map
for the zone edges and handles, but that's a lot more
work.

Fixes: lp:1773204
* https://bugs.launchpad.net/kicad/+bug/1773204
2018-05-25 13:01:58 +01:00
Maciej Suminski 145835661b Replaced footprint library wizard with a common file browser
As of v5 footprint library reorganization (one repo per library concept
is replaced with a common repo for all libraries), the Footprint Library
Wizard may handle only the old libraries. It has been replaced with
a file browser to select only local files.

Fixes: lp:1772209
* https://bugs.launchpad.net/kicad/+bug/1772209
2018-05-25 08:51:46 +02:00
jean-pierre charras 6090f9001e netinfo.i: fix incorrect position of a declaration, that was not taken in account.
Fixes: lp:1544750
https://bugs.launchpad.net/kicad/+bug/1544750
2018-05-24 09:43:04 +02:00
Seth Hillbrand cf2a07559d Safely release thread memory
When starting async processes, we need to have a way to stop the process
before releasing memory.  Descoping FOOTPRINT_ASYNC_LOADER while the
threads were still running could cause crashes depending on the memory
structure.  To avoid this we define clear procedures for exiting a
running async processes and call these when exiting.

Fixes: lp:1772909
* https://bugs.launchpad.net/kicad/+bug/1772909
2018-05-23 08:55:55 -07:00
Maciej Suminski 190d4d6f55 Eagle PCB import: disable copper pour for imported *Restrict layer polygons
Fixes: lp:1772245
* https://bugs.launchpad.net/kicad/+bug/1772245
2018-05-23 17:51:49 +02:00
Seth Hillbrand 8506cdf3ae Avoid numerical dereference of selections
The SELECTION is a std::set.  Numerical dereference of item n is O(n) as
the iterator is not random access.  Therefore, a for loop using
numerical dereference is O(n!) and quickly slows.

We avoid this by storing items to remove separately while iterating and
then removing the items after we complete.

Fixes: lp:1692081
* https://bugs.launchpad.net/kicad/+bug/1692081
2018-05-22 16:37:45 -07:00
Seth Hillbrand 8d52dc9451 Avoid re-checking items already selected
If you select a track with many segments (e.g. a length-tuned track) and
then select all connected items again ('U' -> 'U'), we would iterate
over all items in the selection and mark connections for each of the n
segments n separate times.

We avoid this by using the marked flag to show when the segment has
already been visited by the routine.  This means that if the segment has
been checked for connections because it was connected to the previous
item, it won't be checked for connections again.  However, a selection
that interleaves items from multiple connection segments will still
(potentially) be multiply checked as the BUSY flag is cleared each time
there is one not-BUSY track in the selection.
2018-05-22 16:26:52 -07:00
Seth Hillbrand b625d29151 Only search pads when the position hits module
On large boards with high pad-count modules, searching each pad for hits
becomes expensive.  We eliminate many of the pad searches by first
checking the module's bounding box before iterating over pads to look
for hits.
2018-05-22 15:37:24 -07:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Seth Hillbrand b8f960ea09 Correct message panel sizing
Message panel in update PCB needs size hints from the dialog to
correctly choose the size.
2018-05-22 13:54:48 -07:00
jean-pierre charras 6f249e5eb6 Add missing icons in lock/unlock context submenu 2018-05-22 14:36:35 +02:00
Seth Hillbrand 2d812c2827 Remove FreeRouting icon and menu option
Freerouting-specialized menus are removed as FreeRouting is not
maintained or packaged for most OSes.  Users can still import/export
SPECCTRA files in KiCad allowing them to interface with a custom
FreeRouting installation.
2018-05-21 10:44:32 -07:00
Seth Hillbrand 5d8dd38664 Standardize graphical edit window
The graphical editor window for pcbnew and modedit have slight
differences, so different classes.  But they should appear the same to
the user.  This merges the differences into a dialog that looks the same
to the user.

Fixes: lp:1772389
* https://bugs.launchpad.net/kicad/+bug/1772389
2018-05-21 09:37:04 -07:00
Jeff Young cdde4c4b40 Fix a bug in how we check for differential pair tuning.
Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-21 13:49:40 +01:00
Jeff Young 0fd0e84162 Keep OK/Cancel buttons at bottom of Track/Via Properties.
Fixes: lp:1772260
* https://bugs.launchpad.net/kicad/+bug/1772260
2018-05-21 13:18:41 +01:00
Seth Hillbrand 0c2f9b1827 Keep circles controlled by radius
Circles are defined by center and a point on their edge.  This requires
the user to do extra math to figure out the size of the circle.  The
patch allows the user to edit and draw circles using radial coordinates.
2018-05-20 17:16:44 -07:00