Commit Graph

5961 Commits

Author SHA1 Message Date
jean-pierre charras 821668d96c rename class_collector.h to collector.h 2018-02-04 10:49:37 +01:00
jean-pierre charras 9c22303551 Pcbnew: Fabrication Outputs: Footprint position (.pos) file CSV format : double quote ref, value and package name.
It avoid issues with texts containing a comma, as fields are separated by comma in csv file.

Fixes: lp:1747186
https://bugs.launchpad.net/kicad/+bug/1747186
2018-02-03 21:30:09 +01:00
jean-pierre charras a7a7f62cb7 Specctra export: export roundrect pads with the right shape 2018-02-03 18:50:55 +01:00
jean-pierre charras 1858852f57 rename files 2018-02-02 21:57:12 +01:00
jean-pierre charras dc66b73a2c Make specctra export of custom pad shapes working with Freerouter 2018-02-02 18:52:44 +01:00
Maciej Suminski 95864780e2 Fix cursor freezes in GAL
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.

Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.

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

Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
2018-02-02 19:08:05 +01:00
Maciej Suminski b497673b89 Point Editor: do not modify cursor snap settings 2018-02-02 19:08:05 +01:00
jean-pierre charras d7cfacb6f3 Specctra/Freerouter export fix a few issues:
* Specctra exported polygons are now closed (as required)
* export custom shape is provided in code, but not activated, because i have no way to text it
* fix Specctra export dialog (replace OK and Cancel buttons by only one Close button)
2018-02-02 12:55:11 +01:00
jean-pierre charras 0c8b852e52 rename files 2018-02-01 11:05:01 +01:00
jean-pierre charras e69ddf0e13 rename files 2018-01-31 17:10:01 +01:00
Jeff Young 53a05f18e1 Code review issues from exchange footprints dialog.
Fixes: lp:1466857
* https://bugs.launchpad.net/kicad/+bug/1466857
2018-01-31 10:07:46 -05:00
jean-pierre charras c758e72c1d Remove a useless file and move the 2 methods to suitable files. 2018-01-31 14:54:31 +01:00
jean-pierre charras be746a8e3d rename a few files related to the footprint viewer. 2018-01-31 13:37:36 +01:00
jean-pierre charras 39b4afecfa fix code after file renaming 2018-01-31 09:24:02 +01:00
jean-pierre charras 32aedc99b7 rename files 2018-01-31 09:24:00 +01:00
jean-pierre charras 6d6ef0097b Fix code after renaming files. Minor other fix. 2018-01-30 20:23:35 +01:00
jean-pierre charras d8b9f1081b rename file 2018-01-30 20:23:35 +01:00
jean-pierre charras d4192b4646 rename files 2018-01-30 20:23:34 +01:00
jean-pierre charras b43dc7954c fix code after renaming files 2018-01-30 15:34:09 +01:00
jean-pierre charras ab0a82db19 rename files 2018-01-30 13:55:02 +01:00
jean-pierre charras 342197bb3e fix forgotten code change after renaming 2018-01-30 08:13:33 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras edf9821014 rename files 2018-01-29 21:59:27 +01:00
jean-pierre charras 39fc0656d1 move specctra. files in a specific folder specctra_import_export 2018-01-29 18:09:18 +01:00
jean-pierre charras 30e3f2e781 fix forgotten change after renaming files 2018-01-29 17:34:12 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras bc76ec4d67 Rename files according to the name of classes they are defining 2018-01-29 16:40:20 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 1bc3dfef10 fix compil issue in kicad.i and a minor compil warning 2018-01-28 22:24:51 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras ac0dd118fd fix compil issue in swig interface. 2018-01-28 20:03:46 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
Jeff Young 899afa1e90 Reinstate OSX cursor shape selection
Mark it as not supported in Legacy graphics.

Fixes: lp:1745097
* https://bugs.launchpad.net/kicad/+bug/1745097
2018-01-28 10:47:20 -05:00
Martin Sivak d5cdd78062 eeschema: keystroke zoom should obey disabled centering
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.

This patch introduces special event ids for keystroke
zooming that are then properly translated to either
ID_POPUP_ZOOM_IN or ID_OFFCENTER_ZOOM_IN depending
on the configuration.

The same issue is fixed for legacy canvas pcbnew.

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

Signed-off-by: Martin Sivak <mars@montik.net>
2018-01-27 20:20:32 -05:00
Jeff Young 7a28f3d4cf Implement undo/redo for origins in legacy
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns.  This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack.  This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:51:44 -05:00
Jeff Young 4784ee7fe4 Implement undo/redo for drill and grid origins.
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two.  This also
required the implementation of clone() for the markers.

The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.

In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:40:51 -05:00
Jeff Young 45386ccbf3 Honor SMALL_DRILL_SHAPE option when plotting DXF.
Fixes: lp:1566744
* https://bugs.launchpad.net/kicad/+bug/1566744
2018-01-27 17:33:37 +01:00
jean-pierre charras 06dddb50e6 Avoid fixed min or max size of widgets in dialog 2018-01-26 20:17:55 +01:00
Jon Evans b547c5cdf0 Reapplied: Save view control settings before dispatching new tool events
Unintentionally removed in b8ecc95d.
2018-01-26 19:23:08 +01:00
Maciej Suminski 5f2e9a1e57 Disable right click context menu for measurement tool 2018-01-26 15:55:43 +01:00
Maciej Suminski 3aafa2b574 Clear selection box when another tool is invoked while selecting items 2018-01-26 15:10:48 +01:00
jean-pierre charras 888a9e7371 VRML export: add support of S_POLYGON in DRAWSEGMENT export. 2018-01-24 16:06:31 +01:00
Jeff Young 4c29ab6c09 Simplify Exchange Footprints dialog and add Update mode.
This commit also adds a no-selection-mode, which allows the user
to specify what gets update (through the various match modes).
The no-selection-mode is accessed via the Edit menu, although
it could also be applied to the context menu.

Fixes: lp:1466857
* https://bugs.launchpad.net/kicad/+bug/1466857
2018-01-24 09:55:39 -05:00
jean-pierre charras 875a2b0e10 Fix incorrect vrml export of footprint edge type S_POLYGON. 2018-01-24 14:59:17 +01:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
jean-pierre charras 6436b70176 Fix aDRC issue: sometimes DRC did not detect a track collision with long oval pads. 2018-01-23 17:39:13 +01:00
Tomasz Włostowski 3456b6e3c3 pcbnew: fixed incorrect ratsnest computation when all nodes in a net are on a single line 2018-01-23 11:55:11 +01:00
jean-pierre charras c702646c25 pcbnew: layers visibility affects printing
Fixes: lp:1744730
https://bugs.launchpad.net/kicad/+bug/1744730
2018-01-22 21:23:47 +01:00
Maciej Suminski 9b7d499c51 Fix a memleak in Footprint Library Table Wizard 2018-01-22 10:05:58 +01:00
Jeff Young 8c4874866a Set a selection reference point in get-and-move-module.
This will cause InteractiveEdit to move the reference point to
the cursor before waiting for mouse move events.

Fixes: lp:1571217
* https://bugs.launchpad.net/kicad/+bug/1571217
2018-01-22 09:58:57 +01:00
Maciej Suminski da305e7750 Move SwitchCanvas() implementation to EDA_DRAW_FRAME
Share more code between pcbnew and gerbview. Fix warnings regarding
shadowing EDA_DRAW_FRAME::SwitchCanvas().
2018-01-22 09:06:55 +01:00
jean-pierre charras 81642dddd1 Track polygon clearance: use the new TransformOvalClearanceToPolygon function, to avoid underestimation of clearance areas.
(issue already found for oval pads)
Add some comments.
2018-01-21 11:32:37 +01:00
jean-pierre charras 1db14d44b7 Better calculation of polygon clearance area of oval pads. Wip. 2018-01-20 19:34:50 +01:00
jean-pierre charras ab2333bcf0 Footprint Editor, GAL mode: make option tool "show footprint in outline mode" working.
Fix also option tool "show footprint texts in outline mode" code,
but because there is no code to show texts in outline mode in GAL canvas, this option still works only in legacy canvas
2018-01-19 19:26:48 +01:00
Maciej Suminski 388d07a808 Fix disappearance of placed objects after 'Properties' action 2018-01-19 14:20:42 +01:00
Maciej Suminski 903e33375f Fix rotation & flip of newly placed texts
When a rotation/flip command was issued when a newly placed text
was hovering over an existing item - the item underneath would be
affected by the command and the new text would be discarded.

Fixes: lp:1744152
* https://bugs.launchpad.net/kicad/+bug/1744152
2018-01-19 14:20:42 +01:00
Michael Geselbracht d8f0527677 Fix crash while reading netlist and delete extra footprints enabled
Fixes: lp:1710492
* https://bugs.launchpad.net/kicad/+bug/1710492
2018-01-19 11:25:32 +01:00
jean-pierre charras 41eeb05d81 Fix compil warnings 2018-01-19 11:01:42 +01:00
Maciej Suminski 7d821cb08c Fix netname layers visibility when copper layers are initially off
Fixes: lp:1744183
* https://bugs.launchpad.net/kicad/+bug/1744183
2018-01-19 10:03:42 +01:00
Maciej Suminski d87a7ae58e Fallback to Cairo when OpenGL is not supported
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
Jon Evans b21f301097 Defer canvas type setting save until destruction of EDA_DRAW_FRAME
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
jean-pierre charras 47d392d83e Fix incorrect name (typo) of a method. 2018-01-18 10:11:45 +01:00
Maciej Suminski ef13b97ff7 Complementary patch to 3114fa4a (filter invisible vias when selecting)
This patch handles items selected with selection box.

Fixes: lp:1743894
* https://bugs.launchpad.net/kicad/+bug/1743894
2018-01-18 09:56:43 +01:00
Jon Evans 2b2612120c Filter via selection based on render settings
Fixes: lp:1743894
* https://bugs.launchpad.net/kicad/+bug/1743894
2018-01-18 09:56:43 +01:00
jean-pierre charras 08b15a6990 Pcbnew: graphic segments type S_POLYGON: allows 0 for outline thickness (this allows to create easily the exact polygonal shape).
Fixes: lp:1743982
https://bugs.launchpad.net/kicad/+bug/1743982
2018-01-18 09:32:28 +01:00
Jeff Young 3f6af59cac Avoid selection disambiguation menu when possible.
Some actions, such as select trivial connection, don't need the
user to choose which trace at a corner to start from -- either
one will do.  Same for moving a simple trace corner.

Likewise, Edit in Footprint Editor shouldn't ask if you mean the
footprint or the pad.  Obviously it's the footprint.

This change adds a CLIENT_SELECTION_FILTER which allows clients
to do tool- or action-specific filtering of the selection before
the disambiguation menu is run.

It also removes some tool- and action-specific code which was
in the selection_tool and shouldn't have been.

Fixes: lp:1708869
* https://bugs.launchpad.net/kicad/+bug/1708869
2018-01-18 09:09:25 +01:00
Jeff Young e1c01e1e7f Render transparent layer colors over the correct background.
This fixes the layer comboboxes, the copper zones properties
dialog, and the differental-pair icon in the htoolbar.

Fixes: lp:1741049
* https://bugs.launchpad.net/kicad/+bug/1741049
2018-01-17 11:36:37 -05:00
jean-pierre charras 6014307d06 Pcbnew, DRC dialog: Fix a few issues:
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
2018-01-17 15:36:04 +01:00
Maciej Suminski c1649b1138 Code formatting fixes for 3d177e9c 2018-01-17 10:35:40 +01:00
Jeff Young 3d177e9c2a Thaw pcb window to scroll markers into view.
Fixes: lp:1606849
* https://bugs.launchpad.net/kicad/+bug/1606849
2018-01-17 10:11:02 +01:00
Jeff Young a386da9ee9 Make sure wxWidgets updates DRC notebook when switching pages.
Fixes: lp:1583466
* https://bugs.launchpad.net/kicad/+bug/1583466
2018-01-17 08:38:47 +01:00
Jeff Young 947a4839fd Use generic Save (and New and Open) commands where unambiguous.
Fixes: lp:1743426
* https://bugs.launchpad.net/kicad/+bug/1743426
2018-01-16 08:39:12 -05:00
jean-pierre charras 6b9740e681 Fix issues when in Pcbnew the Update PCB from schematic command is run.
Now, if not yet opened, the schematic editor frame is created, and shown iconized.
(although iconize it is perhaps not the best option)

It fixes a few (minor) issues (when the schematic editor frame is created, but not shown):
- On OSX the schematic frame is shown as a "ghost" frame.
- If later, the schematic editor is opened from Kicad, a message saying the schematic is already opened is shown.
This is technically true, but unexpected by user.
- If symbols need an annotation, the annotation dialog is opened, can can modify the schematics.
  So it could be better to really open the schematic editor frame.
2018-01-16 13:53:03 +01:00
Jeff Young d4ddc009e1 Don't include module drawings in coverage ratio calculation.
If we do, we'll almost always conclude that coverage is near 100%
due to the outline drawing.

Fixes: lp:1743164
* https://bugs.launchpad.net/kicad/+bug/1743164
2018-01-16 13:45:32 +01:00
jean-pierre charras 433b2bff40 Add comments in progress_reporter.h; Remove unused parameter in Fill_All_Zones and remove empty file. 2018-01-16 10:22:25 +01:00
jean-pierre charras 94c8a947ad Progress reporter: remove wxPD_APP_MODAL style, not useful, that creates issues on OSX.
All platforms now use the same code.
2018-01-15 17:57:03 +01:00
jean-pierre charras 63e55e9180 Try to fix a regression on OSX
Fixes: lp:1740909
https://bugs.launchpad.net/kicad/+bug/1740909
2018-01-14 17:38:48 +01:00
jean-pierre charras 0ee38bcb6b fix incorrect filename 2018-01-14 15:04:24 +01:00
jean-pierre charras 5a74fe373b Fix incorrect parent in dialog edit_module_text, when this dialog is called from an other dialog.
Fix also a coding style issue.
2018-01-14 14:28:48 +01:00
jean-pierre charras 82174b5b2d Speed up zone fill calculations after a zone parameters edition. 2018-01-14 11:27:11 +01:00
jean-pierre charras 67a152ee8d zone filler: fix incorrect calculation of segments when filling zones with segments.
The calculation was made too early, before removing insulated islands.
Note: filling zones with segments is an old option, not very useful:
using only polygons has never created issues in gerber files.
2018-01-14 09:51:32 +01:00
jean-pierre charras 39dfc2c762 pad editor: add option to show pad in outline mode. better code and fix minor issues. 2018-01-13 17:09:01 +01:00
Wayne Stambaugh 650207a6e1 Pcbnew: fix 3D viewer panel default size issue.
The 3D viewer panel had a default size that was causing sizing issue
with the footprint properties dialog.  Set the default size to -1;-1
and set the proportion setting to 1 when adding the panel to the sizer
which allows the panel to file in the correct size.

Fixed some minor control spacing issues in the footprint properties
dialog properties tab.

Please note that is only a partial fix for this issue.  There is still
too much vertical space which is partially due to the use of wxSpinCtrl
instead of wxDoubleSpinCtrl.

Fixes lp:1742701

https://bugs.launchpad.net/kicad/+bug/1742701
2018-01-12 20:58:44 -05:00
jean-pierre charras b07cf47591 bigger dialog_fp_lib_table size. 2018-01-12 21:30:48 +01:00
jean-pierre charras 52eedc7192 Footprint editor: Fix a crash when trying to create a custom pad from selected graphic primitives. 2018-01-12 21:25:45 +01:00
Oliver 195b85b0c5 Cleanup of KiCad Icons
Major cleanup of many icons (started as a simple effort to tweak libedit and modedit icons)
Ref: https://lists.launchpad.net/kicad-developers/msg32860.html
* Each application icon has been updated
* Consolidated icon "modifiers" across many icons
* Replaced confusing arrows with "load" and "save" icons
* Slight code updates to reference correct icons
* Consolidate multiple representations of single icon type(s)
2018-01-12 14:06:45 -05:00
Seth Hillbrand 273f0d56cd Suppress Boost::Optional unitialized compile warning
Fixes: lp:1743009
* https://bugs.launchpad.net/kicad/+bug/1743009
2018-01-12 19:58:33 +01:00
jean-pierre charras 79a9f401a3 Fix a minor issue in pad editor dialog: in GAL mode, the pad was sometimes shown in outline mode, sometimes in filled mode
Fixes: lp:1740668
https://bugs.launchpad.net/kicad/+bug/1740668
2018-01-12 19:58:32 +01:00
jean-pierre charras d8e38d6d3f Fix Pcbnew crash when try to fill zone, due to a bug created by commit 8de0598789 2018-01-12 12:55:22 +01:00
Kristoffer Ödmark 98d330f395 Test the via types to the design rules
Fixes: lp:1741695
* https://bugs.launchpad.net/kicad/+bug/1741695
2018-01-11 18:13:59 +01:00
Jon Evans 5fd1236d7a Use worksheet bounding box when the board is empty
Fixes: lp:1742140
* https://bugs.launchpad.net/kicad/+bug/1742140
2018-01-11 11:28:19 +01:00
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Kristoffer Ödmark 5051dc8848 Implemented missing via dialog functions 2018-01-10 15:55:16 +01:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00
Kristoffer Ödmark e7ddcca569 Fix some netname rendering issues
Fixes: lp:1739074
* https://bugs.launchpad.net/kicad/+bug/1739074
2018-01-08 10:29:50 +01:00
Jon Evans 04beb20e3e Scale and zoom view to fit when cross-probing a net on the board 2018-01-07 14:44:36 -05:00
Jon Evans ca264f8982 Add bidirectional net highlight cross-probing
Fixes: lp:1738875
* https://bugs.launchpad.net/kicad/+bug/1738875
2018-01-07 14:12:50 -05:00
Jon Evans a4bb6ec3e4 Allow selecting footprints that are only silkscreen using silk layers
In high-contrast mode, items that don't exist on the current layer are
not selectable, but this is problematic since there are library
components that only exist in the silkscreen layer (logos, etc).

By adding one of the silkscreen layers to the ViewGetLayers() output,
these components are now editable when viewing the silkscreen layer in
high-contrast mode.  Silkscreens attached to footprints that have pads
or drawings on non-silkscreen layers are still not selectable.

Fixes: lp:1741350
* https://bugs.launchpad.net/kicad/+bug/1741350
2018-01-07 14:12:50 -05:00