Commit Graph

4254 Commits

Author SHA1 Message Date
jean-pierre charras e55763947e Set the reight grid visibility at start. Display axis in libedit and viewlib. 2018-10-09 11:08:56 +01:00
Jeff Young fee52e127f Add line style drawing. 2018-10-09 11:08:56 +01:00
Jeff Young 1e3a5c1b21 Fixup of last commit. 2018-10-09 11:08:55 +01:00
Jeff Young 0063f2c12d Stroke rectangles after filling so fill doesn't cover 1/2 of stroke. 2018-10-09 11:08:55 +01:00
Jeff Young 3c82ad3220 Finish up the block rotate/mirror fixes.
Block rotate and mirror now work like they do in Pcbnew (that is
they're treated as part of the block move/duplicate/whatever
rather than finishing it).

Fixes: lp:1780794
* https://bugs.launchpad.net/kicad/+bug/1780794
2018-10-09 11:08:55 +01:00
Jeff Young 7216eda202 Fix bugs in block operations.
1) when duplicating don’t keep original hidden until end of drag
2) reset selectionArea when showing it so it doesn’t flash in its previous location
3) center a pasted block on the cursor
4) don’t draw the source selectionArea when pasting a block
5) implement selection-style highlighting for contents of blocks
6) add pasted items to view so they don’t disappear when the block is placed

Fixes: lp:1747197
* https://bugs.launchpad.net/kicad/+bug/1747197
2018-10-09 11:08:55 +01:00
Jeff Young cb8e6c0df5 Handle GAL view refresh for breaking wires. 2018-10-09 11:08:55 +01:00
Jeff Young 38f38b16c0 Fix dissappearance of moved items. 2018-10-09 11:08:55 +01:00
Jeff Young 5fd20ee786 Implementation of ERC markers. 2018-10-09 11:08:55 +01:00
Jeff Young 58100b62e6 Legacy colors are not stored under a "4D" name. 2018-10-09 11:08:55 +01:00
Jeff Young d7178c7833 Implement GAL refresh for a bunch of operations. 2018-10-09 11:08:55 +01:00
Jeff Young afeebc8944 Grid settings for Eeschema GAL.
Split antialiasing options out from display options.  Move
antialiasing to common.  Duplicate the rest of display options
for Eeschema.

Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.

Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
2018-10-09 11:08:55 +01:00
Jeff Young c5330ac0bf Implement zoom for GAL canvas. 2018-10-09 11:08:55 +01:00
Jeff Young a67d8c60df Fix text size measurement.
5.0 doesn't set the GAL's line width.  It gets away with this since
it's using the same GAL to measure as to set up the drawing, so
the width happens to be set correctly for other reasons.  5.1 uses
a separate GAL and so isn't so lucky.
2018-10-09 11:08:55 +01:00
Jeff Young b002b96db6 Fix a crash when aborting a block command. 2018-10-09 11:08:55 +01:00
Jeff Young 515135579b UseGalCanvas() no longer means ToolManager() exists. 2018-10-09 11:08:55 +01:00
Jeff Young da4fb4ae3a Move galDisplayOptions access from pcbnew to common. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 48d36f854e eeschema-gal: fix cursor shape switching 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski ccb594f599 eeschema-gal: support for global labels and bitmaps 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski d9f0dc63a5 eeschema-gal: temporarily disable scrollbar code (causes crashes after Jeff's changes) 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski b604f007d7 eeschema-gal: don't use kiROUND in the geometry library as it brings in a s*****load of wx dependencies due to #include <base_units.h> 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 5f7c923b8b eeschema-gal: post-rebase fixes 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 9ab79daf74 SELECTION_AREA: use abstract render settings object 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski ef1f01a8bd VIEW: use BOX2D for view boundary 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 26177efba0 VIEW_GROUP: correctly calculate group extents 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 838458bc3a eeschema-gal: Base refactoring before GALification of the eeschema legacy canvas.
Note: it's only the renderer that is changed from wxDC to GAL. Tools stay the same, consider this a temporary hack.

This commit splits the EDA_DRAW_FRAME, EDA_DRAW_PANEL and BLOCK_SELECTOR classes into two variants, each independently compiled into a static library.
- "legacy_wx" for PCBnew/Gerbview - wxDC-based legacy canvas. We have full GAL support there anyway so it makes no sense to introduce GAL rendering API to the legacy tools.
- "legacy_gal" for EEschema and the rest - GAL-based legacy canvas, using legacy tools but with a GAL renderer.
Such split ensures only a small part of the common library and eeschema is affected, without messing around with already GALified tools.

The commit also removes some header dependencies on class_drawpanel.h
2018-10-09 11:08:52 +01:00
Tomasz Wlostowski f82f310dd5 eeschema-gal: added EnableDepthTest() feature in GAL 2018-10-09 11:08:52 +01:00
Tomasz Wlostowski 0d720fdeff eeschema-gal: factor out EDA_DRAW_PANEL from BITMAP_BASE, remove some unnecessary includes of class_drawpanel.h 2018-10-09 11:08:52 +01:00
jean-pierre charras 82cb61b8af dialog_page_settings: avoid useless confirmation dialog after changing the page layout file. 2018-10-09 11:29:48 +02:00
Jeff Young 3024ded91e Improve robustness of numeric evaluation.
It would appear that some platforms process the KILL_FOCUS event
after running TransferDataFromWindow().  This change makes sure
that the evaluation is done no matter the order.

Fixes: lp:1793911
* https://bugs.launchpad.net/kicad/+bug/1793911
2018-10-08 12:59:40 +01:00
Jeff Young d1a679e496 Save original_text before obliterating it.
Fixes: lp:1793911
* https://bugs.launchpad.net/kicad/+bug/1793911
2018-10-07 23:37:16 +01:00
jean-pierre charras de793aa43d Fix a side effect of our LOCALE_IO by using setlocale( LC_NUMERIC, "C" ) instead of setlocale( LC_ALL, "C" )
LC_NUMERIC is the right option to use in LOCALE_IO because only the floating point separator must be modified
When using LC_ALL, the Env var expansion wxGetEnv() was not working when the env var contains non ascii7 codes after a call to LOCALE_IO.
When using setlocale( LC_NUMERIC, "C" ) in LOCALE_IO, wxGetEnv() works fine.

Fixes: lp:1795990
https://bugs.launchpad.net/kicad/+bug/1795990
2018-10-07 16:26:10 +02:00
Wayne Stambaugh 34ea79eddb Fix LIB_ID illegal character tests.
The '/' and ':' are reserved and cannot be used in symbol or footprint
names.  They will cause the LIB_ID parser and formatter to fail.  While
it seems like they should be legal in symbol alias names, they will
trigger a symbol rescue the next time the schematic is loaded.

Use ID_SCH as in the Eagle schematic plugin rather than ID_ALIAS to
ensure symbol names do not need rescued the next time the schematic is
opened.

Remove ID_ALIAS since the rules for alias names are the same as the
rules for symbol names.  Otherwise, allowing '/' and ':' in alias names
will force a symbol rescue on the next schematic load.

Fixes lp:1795600

https://bugs.launchpad.net/kicad/+bug/1795600
2018-10-07 09:09:27 -04:00
Seth Hillbrand ceca3e526c view: Do not include hidden items in query
When querying the view, we do not want to including items that are not
on layers that are currently visible.  This routine is currently only
used by the selection tool (pcbnew and gerbview) and the grid helper.
Both expected this logic but were indifferent to the additional items.

Fixes: lp:1796403
* https://bugs.launchpad.net/kicad/+bug/1796403
2018-10-05 16:45:38 -07:00
Jeff Young 5ce14dad2a Flush out whatever the dialog-is-closing guard was for.
The guard isn't working on GTK (causing eval not to happen on
a kill focus), and I can't remember what issue I put it in to
solve.  I've done a bunch of testing and it appears that we
don't need it, although I'm sure I put it in for something....

Fixes: lp:1793911
* https://bugs.launchpad.net/kicad/+bug/1793911
2018-10-05 20:19:16 +01:00
Hal Gentz 416e64a334 Spice plot widget: more accurate rendering
Patch modifies the way graphs are displayed: instead of drawing one
point for each X coordinate, there is a line segment joining min and max
values for continuous graphs and all unique points are displayed for
discrete graphs.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:49:41 +02:00
Maciej Suminski 70c1de3275 Spice simulator: faster graph rendering
Graph rendering takes a lot of time, especially when there is a high number
of points to be drawn. The initial implementation drew all points/lines
even if the the coordinates were duplicates, in the new version duplicated
coordinates are skipped.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:39:38 +02:00
John Beard 3a9e7a496a Centralise some UI constants, use in hotkey lists
There are lot of places where constants are used in the KiCad UI
as "magic numbers". The most common one is "5", used in many
wxFormBuilder and manual UI constructions as the margin.

This commit provides a place for all UI to look up shared
constants and other functions, to help create a consistent UI using
functions that provide meaning and intent to these magic numbers.
2018-10-04 07:47:21 -04:00
John Beard 0be9667c96 Add read-only option for hotkey list, use for list dialog
This replaces the flat HTML list dialog with a read-only
version of the editor dialog in a pared-down dialog.

Fixes: lp:1778374
* https://bugs.launchpad.net/kicad/+bug/1778374
2018-10-04 07:47:21 -04:00
John Beard 7c2c8d307e Add tooltips to hotkey dialog buttons
THis is done in the generic widget, so other users can
benefit from it.
2018-10-04 07:47:21 -04:00
John Beard 23038b1550 Simplify hotkey editor widget
This is in preparation for making this widget optionally read-only.

Major changes:

* Construct panel in code, not with wxFormBuilder. This make's it
  easier to conditionally construct elements that won't be used
  in a read-only mode (e.g. the buttons).
* Use a generic "button row panel" widget for the buttons, as the
  sizing and layout logic is reusable in nearly all dialogs, and
  it's simplifies layout in the higher-level dialog widget. This
  widget is one example of many possible "reuable widgets".
2018-10-04 07:47:21 -04:00
John Beard 445a9fa963 Put cursor and pan control in libcommon/tool, enable in Gerbview
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.

The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.

Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
Jeff Young c9ca1013b2 Make ModEdit and LibEdit library tree actions more consistent.
Adds Cut/Copy/Paste and Revert for footprints; introduces a new
shared Revert Changes? dialog; hooks up Add Library for footprints,
standardizes the Save As terminology.
2018-10-03 22:46:41 +01:00
John Beard 3da0d03c36 Centralise utilities for env variables.
This puts generic logic for KiCad environment vars in
one place.

Also updates the DIALOG_CONFIGURE_PATHS help to document
the new KICAD_USER_TEMPLATE_DIR and KICAD_TEMPLATE_DIR.
2018-10-03 11:53:10 -04:00
Jeff Young b5fd9e830f A bit more safety around disabling the event handler. 2018-09-29 23:05:43 +01:00
Jeff Young 2eea45b50c Go back to earlier strategy for net selector popup.
This version makes use of lots of things learned going down the
other rat hole.  Avoiding the wxComboFocusHandler is key, as well
as specifying using the AltPopupWindow.

The key handler is still tricky with respect to those platforms
that use native controls, but the starting-key strategy is similar
to the one used with wxGrid text editors.
2018-09-29 22:07:31 +01:00
Jeff Young 3c2aafd7b7 Move Edit Symbol References to standard text/button control. 2018-09-29 22:07:31 +01:00
jean-pierre charras 26838c6800 Pcbnew: Crash after running external plugin
Happens only in Opengl mode.
So enforce controls in 3 group function: DrawGroup, ChangeGroupColor, ChangeGroupDepth.

Fixes: lp:1795044
https://bugs.launchpad.net/kicad/+bug/1795044
2018-09-29 12:58:47 +02:00
Jeff Young 5843b1a6a1 Possible solutions to <enter> and keyboard activation on GTK. 2018-09-29 10:28:19 +01:00
Jeff Young 3f6819e592 Improve visiblity of net selector popup. 2018-09-28 22:39:42 +01:00
Jeff Young 0a43584c5c Another attempt to catch enter on GTK, and better button processing. 2018-09-28 19:36:50 +01:00
John Beard 704615721f Prevent segfault when undoing or resetting non-hotkey rows
This is caused by:

* Not checking the hotkey data is not null when performing a
  hotkey action
* Allowing hotkey actions on non-hotkey rows.

This fixes both of these, and adds an assert to warn if someone
does manage to fire a hotkey action on a non-hotkey row (but it
won't crash).

Fixes: lp:1794756
* https://bugs.launchpad.net/kicad/+bug/1794756
2018-09-28 08:28:30 -04:00
John Beard a294e8d6c4 Check for conflicts when reseting/undoing hotkey changes
It was possible to get conflicting hotkeys when undoing and resetting hotkeys
to defaults.

This uses the same logic as when setting hotkeys to avoid conflcits in these
other two cases.

Fixes: lp:1794730
* https://bugs.launchpad.net/kicad/+bug/1794730
2018-09-28 08:28:22 -04:00
John Beard 3283bd9fdc Mark modified hotkeys in the hotkey editor
THis uses a simple " *" suffix, as the wxTreeListCtrl-derivative
widget doesn't allow easy access to things like font style.
2018-09-28 08:28:16 -04:00
John Beard 9f38b70491 Add a filter box to hotkey dialog and filter using it
This uses a simple case-insensitive partial match, which is
a good start for the relatively limited number of hotkeys
generally present.
2018-09-28 08:28:04 -04:00
John Beard 4f0166e064 Add some hotkey store tests
This also adds some mocks to the libcommon test executable, which
hopefully will allow it to work with more of libcommon.
2018-09-28 08:27:57 -04:00
John Beard 1f2c8fa698 Separate storage at iteration of hotkeys from the HK list widget
This separates the "ground truth" store of hotkeys from what is shown
in the dialog. This will allow us to filter the displayed hotkeys
while keeping the same underlying data structures.

Now, the UI data items interact with an intermediate set of data, which
represents the "original" hotkey data, and the "changed" data. The
ultimate aim here is to allow UI elements to come and go, but the
hotkeys that are "in-edit" are preserved.

This also allows us to abstract some bookkeeping complexity
out of the WIDGET_HOTKEY_LIST class into a separate non-GUI
class.
2018-09-28 08:27:51 -04:00
Jeff Young 3927dc5820 More fixes for event handling in net selector. 2018-09-28 00:23:22 +01:00
Jeff Young 453dadbc3c Use EventFilter strategy on GTK; leave FocusLost for MSW & OSX. 2018-09-27 20:42:59 +01:00
Jeff Young 136525b870 Decrease list-item padding for GTK. 2018-09-27 18:58:32 +01:00
Jeff Young 5703060d87 Turn off escaping names for now.
Fixes: lp:1794816
* https://bugs.launchpad.net/kicad/+bug/1794816
2018-09-27 17:21:49 +01:00
Jeff Young 50b96b406f More net selector fixes. 2018-09-27 16:58:12 +01:00
Jeff Young 3ae049c729 Address some MSW issues in net selector. 2018-09-27 14:44:42 +01:00
Jeff Young f10635e8be More work on arbitrary characters in references, etc. 2018-09-27 14:44:42 +01:00
jean-pierre charras 4a553b6423 NET_SELECTOR fix: remove SetHint() because it does not work on Windows, that prevents filtering.
Replaced by a wxStaticText
Minor cosmetic fixes (on Windows)
2018-09-27 13:19:09 +02:00
Jeff Young 521183a587 Work in progress to allow arbitrary chars in references, etc. 2018-09-27 11:56:51 +01:00
Jeff Young eaf3d48260 Simplification of the net selector code to fix GTK issues. 2018-09-27 11:52:58 +01:00
Jeff Young d1e64919a7 Fix for GTK net selector popup border. 2018-09-26 22:50:27 +01:00
Jeff Young f7ffbb17bb Another try at the net selector popup. 2018-09-26 21:57:35 +01:00
John Beard 04a1084549 QA: Place UTF8 tests under Boost unit tests
This transfers the old #if'd-out tests in utf8.cpp into a
proper Boost unit test in /qa (run on `make test`).
2018-09-26 09:32:26 -04:00
Jeff Young 86b654e493 Hook up 3D viewer to common preferences.
Also removes nanny limits on text sizes.

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

Fixes: lp:1794345
* https://bugs.launchpad.net/kicad/+bug/1794345
2018-09-25 20:47:03 +01:00
Jeff Young 3cc6e0cf02 Fixes to NET_SELECTOR event loop for non-OSX platforms.
Don't assume events are always Pending().  Other platforms handle
idle events differently.
2018-09-25 17:56:38 +01:00
Jeff Young 37f7faf433 Move lock checks to CLIENT_SELECTION_FILTER.
Also checks render item visibility as well as layer visibility
when making selections.

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

Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Jeff Young 66848b9334 Show pads when parent footprint is selected.
Fixes: lp:1670090
* https://bugs.launchpad.net/kicad/+bug/1670090
2018-09-23 23:51:13 +01:00
Seth Hillbrand ae13e441af pcbnew: Yield in GTK for redraw
GTK uses a level of cooperative multitasking when dealing with
secondary event loops.  This gives the wm enough leeway to process the
redraw before returning to the secondary loop
2018-09-22 19:38:42 -07:00
Jeff Young cbce4d7663 Work around a stupid assert in GTK wxGUIEventLoop::Dispatch() 2018-09-22 19:38:42 -07:00
Jeff Young 0309228276 Don't allow drawing to a zero-height or zero-width GAL canvas.
Fixes: lp:1793913
* https://bugs.launchpad.net/kicad/+bug/1793913
2018-09-22 22:06:40 +01:00
Jeff Young 458af25282 Turn problematic code off for now.... 2018-09-22 17:54:59 +01:00
Jeff Young 4edf18b023 Attempt to fix Linux build issue. 2018-09-22 17:41:52 +01:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Jeff Young 666da3849b Make esc dismiss net and layer selector popups. 2018-09-22 16:23:13 +01:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Fabio Rossi 21485e6f24 kicad_curl should be built only with BUILD_GITHUB_PLUGIN enabled 2018-09-21 12:44:20 -07:00
Jeff Young 42ab116bc2 Rewrite the NET_SELECTOR combobox in the hopes of better platform support. 2018-09-21 20:40:04 +01:00
Simon Richter e985f797c3 Return reference to current object from operator= 2018-09-21 05:03:30 -07:00
Seth Hillbrand 8c3a82e526 Code cleanup: Fixing assignment operators 2018-09-20 20:15:47 -07:00
Maciej Suminski cd5b1c2885 set_wxMenuIcon: prevent null pointer dereference 2018-09-19 14:07:50 +02:00
Jeff Young e485cee384 Honour ModEdit layer colors in browser and previews.
Fixes: lp:1793141
* https://bugs.launchpad.net/kicad/+bug/1793141
2018-09-18 19:14:35 +01:00
Seth Hillbrand 9e33d38cd5 unit_binder: allow updates without triggers
Adds a helper function to allow unit binder calls that change a value
but shouldn't trigger wxevents
2018-09-17 15:55:22 -07:00
Wayne Stambaugh aacb3f9075 Update translators list to include simplified Chinese translator. 2018-09-17 10:12:03 -04:00
Jeff Young e45afdb912 Revert absolute-path asserts and fix off-by-one bug.
Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
2018-09-15 22:36:09 +01:00
Jeff Young 02a3f83040 Implement poor-man's RTTI for use over KiWAY.
Fixes: lp:1777883
* https://bugs.launchpad.net/kicad/+bug/1777883
2018-09-15 20:06:42 +01:00
Jeff Young 872e1e6532 Remove asserts for absolute paths.
You can, for instance, specify relative paths via the command
line.

Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
2018-09-15 20:06:42 +01:00
Wayne Stambaugh af2dcd61bb Fix build error against head of wxWidgets master branch.
The wxTreeCtrl header file wx/treectrl.h needs to be included in
common/widgets/paged_dialog.cpp.
2018-09-14 10:49:54 -04:00
jean-pierre charras 271fb7fed4 Make the color picker dialog translatable
Fixes: lp:1792556
https://bugs.launchpad.net/kicad/+bug/1792556
2018-09-14 13:34:53 +02:00
Maciej Suminski b39bde0f0c Specify string size when creating wxString from const char*
wxString constructor will determine string length using strlen() when it
is not explicitly specified, but there is no termination byte added when
reading file contents to 'buffer' variable.
2018-09-14 10:13:45 +02:00
Seth Hillbrand 3ebba6cbe1 pcbnew: Limit zone simplification
Commit 73c229714 was a bit of a sledgehammer for the associated problem
of degenerate points.  This commit replaces that one by only performing
additional simplification of the zone polygons on those polygons that
fail our initial triangulation attempt.
2018-09-12 15:28:13 -07:00
Jeff Young 23726116ee Revert code that got accidentally committed.
(This didn't fix the problem anyway; I had to fix it in our OSX
wxWidgets branch.)

Fixes: lp:1792196
* https://bugs.launchpad.net/kicad/+bug/1792196
2018-09-12 19:34:55 +01:00
Jeff Young 9b50b94069 Move OnUpdateUI event to dialog.
Fixes: lp:1792096
* https://bugs.launchpad.net/kicad/+bug/1792096
2018-09-12 14:01:36 +01:00
Jeff Young 806b1fc63d Fix bugs to enable read-only grid cells to be copied.
Fixes: lp:1791129
* https://bugs.launchpad.net/kicad/+bug/1791129
2018-09-12 14:01:36 +01:00
Jeff Young cbb3492d98 Standardize Footprint Viewer and Footprint Browser.
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.

Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667
2018-09-12 14:01:35 +01:00
Maciej Suminski f5de8cd3e1 Fix a possible out-of-bounds access in WX_GRID::SetTable() 2018-09-12 10:53:16 +02:00
Alexey Chernov 3ad1cd8d57 Adding OpenSSL include directory explicitly
Fixes: lp:1791164
* https://bugs.launchpad.net/kicad/+bug/1791164
2018-09-10 07:14:37 -07:00
Seth Hillbrand 4eece522df kicad: keep KIDIALOG boxes above other windows
Until answered, dialog boxes should remain at the front.  This flag only
works for MSW and GTK.
2018-09-08 21:24:29 -07:00
Seth Hillbrand ec33381064 pcbnew: Keep Yes/No dialogs above the windows
Modal yes/no questions should not be allowed to fall behind other
windows.  They need to be answered before the program continues and
clicking outside of the dialog should not hide dialog itself.

Fixes: lp:1790640
* https://bugs.launchpad.net/kicad/+bug/1790640
2018-09-08 21:09:57 -07:00
qu1ck c68ad411ff pcbnew: add 3d models properties to swig
Fixes: lp:1758858

https://bugs.launchpad.net/kicad/+bug/1758858
2018-09-08 10:28:55 -04:00
jean-pierre charras 80b25aa601 Fix incorrect calculations in WORKSHEET_DATAITEM::GetMarkerSizeUi()
It creates a lot of integer overflow in Pcbnew in Debug mode (Legacy mode), although it ha meaning onlt for the Page Layout Editor.
This function should be deprecated when the GAL canvas is used in Page Layout Editor.
2018-09-06 11:48:53 +02:00
Seth Hillbrand 73c2297144 triangulation: Fracture/Simplify all polygons
Calls the simplify/fracture polygon code on any polygon prior to
tesselation.  This avoids issues with degenerate polygons where the
degenerate points are not sequential.

Fixes: lp:1790534
* https://bugs.launchpad.net/kicad/+bug/1790534
2018-09-05 15:11:13 -07:00
Thomas Pointhuber c170e8930b Fix focus bug and possible race-condition for path deletion dialog
Fixes: lp:1788873
* https://bugs.launchpad.net/kicad/+bug/1788873
2018-09-04 08:52:51 +02:00
Seth Hillbrand a6325aab29 Replacing Tesselation
Replaces Poly2Tri with updated code to process polygons faster and more
robustly.  Notably, we can now handle overlapping holes in the polygons,
allowing us to cache the triangulation of complex boards
2018-09-01 19:30:50 -07:00
jean-pierre charras 23ec0cda31 Fix use of a deprecated wxGrid function. 2018-08-30 09:07:33 +02:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Jeff Young f470132862 Fix fast grid switching for OSX and Footprint Editor.
Fixes: lp:1787066
* https://bugs.launchpad.net/kicad/+bug/1787066
2018-08-29 20:08:01 +01:00
Jeff Young 21eea1f567 Remove HasFocus() checks (which don't work on all platforms) in favour of row highlighting which is visible without focus.
Fixes: lp:1788873
* https://bugs.launchpad.net/kicad/+bug/1788873
2018-08-29 20:08:01 +01:00
Jeff Young 895fc0b536 Add a cell editor for paths and use it in Configure Paths. 2018-08-29 20:08:01 +01:00
Jeff Young f9412f0fd4 Implement double-click for other filetypes in project tree.
Fixes: lp:1787207
* https://bugs.launchpad.net/kicad/+bug/1787207
2018-08-29 19:59:02 +01:00
Jeff Young 45bc1b1aff Add single-click editing to grid cells. (Experimental.) 2018-08-29 19:59:02 +01:00
Jeff Young b90a261d5c More safety fixes for uncommitted grid changes. 2018-08-29 19:59:01 +01:00
Seth Hillbrand dc4125206b GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 15:00:05 -07:00
Wayne Stambaugh 089f27f485 Remove more dialog control borders. 2018-08-27 15:11:27 -04:00
Jeff Young a860a8db54 Enable user layers in footprint editor.
Fixes: lp:1746279
* https://bugs.launchpad.net/kicad/+bug/1746279
2018-08-27 18:38:56 +01:00
jean-pierre charras a330eb1575 Add Chinese traditional in language list. 2018-08-27 18:30:49 +02:00
Seth Hillbrand cc26da394a Code formatting and fix ordering warning 2018-08-27 08:38:58 -07:00
Oliver e95b2872f6 Add x/y dimensions to PCB ruler
- Display dx and dy in addition to euclidian distance and angle
2018-08-27 09:29:30 -04:00
qu1ck 72f87861bb pcbnew: Add toolbar buttons for action plugins
Allows optional toolbar buttons for action plugins.
2018-08-26 19:39:27 -07:00
Tomasz Wlostowski 2186db976b VIEW: added support for VIEW_OVERLAYS (temporary overlays for drawing debug graphics)
x
2018-08-24 14:42:49 +02:00
Jeff Young d10bfb13d6 Re-enable text layers now that DRC & zone fills are fixed.
Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-24 10:56:13 +01:00
Jeff Young ec9d38e21f Add filter to net selector widget.
Also fixes a bug where nets wouldn't get changed because the
pads weren't changed and so the pad nets would propagate and
wipe out the changed nets on the tracks.

Also includes warning dialogs that pad nets will be changed if the
track nets are.

Fixes: lp:1779854
* https://bugs.launchpad.net/kicad/+bug/1779854
2018-08-24 10:56:13 +01:00
Jeff Young 8957008c2a Adjust grid cols for large fonts and/or long translations.
Fixes: lp:1788495
* https://bugs.launchpad.net/kicad/+bug/1788495
2018-08-24 10:56:13 +01:00
Jeff Young 30bb911154 Bring PICKER_TOOL in line with other tools.
Use standard Magnetize() to handle grid and magnetic pads.

Use the standard menu from PCB_TOOL.  Delegating the menu to
the SELECTION_TOOL just caused grief.

Also brings clients (such as Position Relative To) into line,
and implements better Cancel behaviour.

Also improves visibility of modal status messages:
- moves Select Anchor message from status bar to popup
- moves Select Reference message from dialog to popup

Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-23 00:58:01 +01:00
Andrew Zonenberg 60a55d75fa Split prohibited text layers for footprints and the rest of the PCB
Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-21 16:34:53 -07:00
Jeff Young bc2481a9be Don't leak file descriptors. 2018-08-21 19:44:42 +01:00
jean-pierre charras 0305d9143d key event in draw_panel.cpp: fix incorrect behavior for the escape key (the key was handled but the evnent was skipped).
This create an incorrect behavior because the event key was resend because
the primary event was seen as not handled by the drawpanel.
2018-08-21 20:05:09 +02:00
Jeff Young dbd3900e28 Add comments and show recently used even when empty. 2018-08-21 11:20:17 +01:00
Jeff Young 2e5d8061aa Run CommonSettingsChanged after all panels have been committed.
Fixes: lp:1787377
* https://bugs.launchpad.net/kicad/+bug/1787377
2018-08-21 10:34:41 +01:00
Jeff Young 779398891d Follow HIG guidelines for destructive button separation. 2018-08-21 10:34:41 +01:00
Jeff Young 65f62f93ef Fix MSW spacing issues. 2018-08-21 10:34:41 +01:00
Jeff Young a6d10d6e28 Constant-size page layout object handles w/respect to zoom.
Fixes: lp:1787491
* https://bugs.launchpad.net/kicad/+bug/1787491
2018-08-21 10:34:41 +01:00
Jeff Young 86a801aabc Allow updating of file history size on the fly.
Also updates the file menu IDs so that we can actually handle
more than 9 items in the file history.

Also adds configurable file history length to the other gerber
files (zip, drill and job).

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
2018-08-21 10:34:41 +01:00
José Jorge Enríquez 8d625854b8 Allows custom number of entries in recently opened files menu.
NEW: Adds a configuration option to set number of entries in the "Open Recent" menu.

Fixes: lp:1745729
* https://bugs.launchpad.net/kicad/+bug/1745729
2018-08-21 10:34:41 +01:00
Jeff Young e47351d1a6 Highlight only leaf nodes when filtering lib tree.
Fixes: lp:1787709
* https://bugs.launchpad.net/kicad/+bug/1787709
2018-08-19 17:59:32 +01:00
Jeff Young 53cd923305 Minor fix to tooltip and comment. 2018-08-19 17:02:47 +01:00
Jeff Young c5781105ee Fix layout and grouping issues in color picker. 2018-08-19 16:10:41 +01:00
jean-pierre charras 6fdc5972f8 Better fix for accelerator menus using "Back" (previously named "BkSp") key
Use the wxWidgets official accelerator key string for WXK_BACK (this is "Back") in menuitems instead of "BkSp"
Also when reading the hotkey config file, avoid to set a hotkey to unassigned when its name is not found in list.
The default value is used.
Unassigned hotkey use <unassigned> as key name (and 0 as key code) in file.
2018-08-16 15:56:13 +02:00
Tomasz Wlostowski aab40ee9e8 OPENGL_GAL: don't use glCopyBuffer() on faulty Intel GL drivers
Fixes: lp:1787221
* https://bugs.launchpad.net/kicad/+bug/1787221
2018-08-16 14:34:36 +02:00
Jeff Young 8db361882b Fix compile error on Linux. 2018-08-14 14:57:42 +01:00
Jeff Young 122d7ed3b3 Improve document file handling.
Fixes: lp:1779512
* https://bugs.launchpad.net/kicad/+bug/1779512
2018-08-14 13:54:04 +01:00
Jeff Young d72fdaed29 Rewrite Library Symbol Properties dialog.
Fix the user-model issues around aliases and alias selection.
Fold Library Symbol Fields into Library Symbol Properties.
Update to the new look.

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

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

Fixes: lp:1786339
* https://bugs.launchpad.net/kicad/+bug/1786339
2018-08-14 13:54:04 +01:00
Jeff Young 01882d3103 Add more/better error messages for file i/o problems. 2018-08-14 13:54:04 +01:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01:00
Jeff Young d81faa72c9 Overhaul border drawing in all the Kicad frames.
Primary change is to replace most control/window borders with
AUI pane borders.  We implement our own AUI border drawing
routine which avoids the ugly one-pixel white frames around
dark canvasses.

Also increases the signal-to-noise ratio of all the pane
creation code in the various frames.
2018-08-11 17:25:38 +01:00
Jeff Young 68bd1abf78 Fix nullptr access on 2nd launch of eeschema. 2018-08-11 17:14:27 +01:00
Jeff Young 38464827fc Fix some issues with zooming.
Don't process zoom both in Legacy code and Modern code; one of
them will decide the zoom has already changed and do odd things.

Make sure the view is updated after zooming, otherwise you have
to move the mouse over the canvas before seeing the new zoom.
2018-08-11 17:14:27 +01:00
jean-pierre charras 78ab5c3f07 Fix ASCII code used in accelerator menus for BkSp key (Linux only)
On Linux (GTK?) the accelerator key BkSp, when used in menus must be coded as "\t\b" and not "\tBkSp".
However, On Windows, it must be "\tBkSp".
Joys of multi-platform development.
2018-08-09 17:55:08 +02:00
jean-pierre charras 3eb3db02c3 Cvpcb, DISPLAY_FOOTPRINTS_FRAME: add measurement and zoom to selection tools. 2018-08-09 11:15:43 +02:00
Jeff Young f6f1c1e944 Performance optimization for MSW directory time-stamping. 2018-08-08 20:07:26 +02:00
Jeff Young 80f713f366 Revert accidental commit. 2018-08-08 12:51:31 +01:00
Jeff Young d63d0c40ef Performance optimisation for MSW direcotry timestamping. 2018-08-07 20:16:25 +01:00
Jeff Young 7c04d8be1c Double opening speed of PCBs with ground and/or power planes.
(Or any other boards with complicated zones.)
2018-08-07 17:01:44 +01:00
Seth Hillbrand 539ca5aa3b Adjust RTree default floating point to use double
This reverts the previous work-around 7d62f14dd for the RTree splitting
degeneracy that was placed prior to v5.  It appears not to have worked
for all systems.  In its place, we use doubles instead of floats to
calculate the bounding box when filling the RTree.  This keeps maximum
volume items from overlapping with the system boundary in test cases.
2018-08-06 16:55:00 -07:00
Wayne Stambaugh bbfce129bb Fix windows build error. 2018-08-06 10:26:22 -04:00
Jeff Young be1d6113d6 More performance enhancements.
Be more intelligent about sorting lib tree items.  (Footprint
entries, for instance, come out of an already-sorted list.)

Don't recreate menus twice when laoding Footprint Editor.

More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.

For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.
2018-08-06 13:49:27 +01:00
Jeff Young 0fbe702043 Layout adjustments to Choose Symbol and Choose Footprint. 2018-08-06 13:48:17 +01:00
Jeff Young 08bcec9ac0 Make sure symbols have a valid lib nickname...
... even if the library pointer isn't set.

Also fixes the "every symbol as a Unit A" issue.

Fixes: lp:1785438
* https://bugs.launchpad.net/kicad/+bug/1785438
2018-08-06 13:48:17 +01:00
Jeff Young 146ab1eb32 Small performance improvement loading stroke font. 2018-08-06 13:48:17 +01:00
Jeff Young d52429fc3c Read footprint info cache when fpinfo requested via kiway. 2018-08-06 13:48:17 +01:00
Jeff Young c1cf7c32c3 Performance enhancement: don't process envvars in configs. 2018-08-06 13:48:17 +01:00
Jeff Young 0cd75b2556 Flip show/hide of controls so they're shown when doing layout.
Fixes: lp:1785113
* https://bugs.launchpad.net/kicad/+bug/1785113
2018-08-06 13:48:17 +01:00
jean-pierre charras 8cb94f09c3 Allows bigger image size in DIALOG_IMAGE_EDITOR 2018-08-04 19:10:20 +02:00
jean-pierre charras 0902bbabc5 Allows bigger max page size (120x120") in Eeschema, Gerbview and Page Layout Editor
Due to its small internal unit, pcbnew still have a max page size of 48x48"

Fixes: lp:1785155
https://bugs.launchpad.net/kicad/+bug/1785155
2018-08-04 17:19:48 +02:00
jean-pierre charras c32fcd1403 Fix commit f3f814e622 that breaks the compilation on Windows.
Fiw also a minor compil warning
2018-08-04 17:18:15 +02:00
Jeff Young fd3e57d67f Layout adjustments and language-change-updating for modview. 2018-08-04 12:59:04 +01:00
Jeff Young 345f57ccb8 Fix bug in optimization of wxExpandEnvVars.
Fixes: lp:1785228
* https://bugs.launchpad.net/kicad/+bug/1785228
2018-08-04 11:29:24 +01:00
Jeff Young 33fc74a04d Performance enhancements for Footprint Editor construction. 2018-08-04 10:29:17 +01:00
Jeff Young f3f814e622 Performance enhancements for footprint info list.
Cache the footprint info on disk (in the project).
Move timestamp-generation (and checking) to the filesystem so the
above will be bullet-proof.
Rewrite some wxWidgets classes for performance (see common.h).
2018-08-04 10:29:17 +01:00
Jeff Young 5e8e2570ba Fix thread-safety issue with some global wxStrings.
These cause intermittent crashes in footprint loading.  See
comments in code.
2018-08-04 10:29:17 +01:00
qu1ck 72fcf46430 Extend swig definitions to contain SHAPE_LINE_CHAIN and VECTOR2I 2018-08-02 17:03:11 -04:00
Wayne Stambaugh 8e7d6063fd Minor dialog and frame window improvements.
Drop all uses of wxRAISED_BORDER and wxSUNKEN_BORDER from dialogs and
panels used in main frame windows.

Drop use of wxSP_3DSASH options on all wxSplitterWindow definitions.

Minor dialog alignment and spacing fixes.
2018-08-02 13:00:41 -04:00
Jeff Young d8d4f75fa1 Fix button order and genralize Exit dialog so it can be shared more.
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).

Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034
2018-08-02 11:01:03 +01:00
Jeff Young 3a39ea21a2 Library pointer can be null even when LibId is set. 2018-08-01 15:27:54 +01:00
Jeff Young 2155dd6591 Simplify ExitDialog and make platform-compliant.
Put the buttons in platform-compliant order.
Get rid of SaveMultiOptions in favour of repeated standard save
dialogs with a "Apply to all" checkbox.

Fixes: lp:1783444
* https://bugs.launchpad.net/kicad/+bug/1783444
2018-08-01 15:27:54 +01:00
Jeff Young 72338a7002 Remove more dead code. 2018-08-01 12:36:55 +01:00
Jeff Young 6dbfa793e8 Fix GTK compile errors and remove dead code.
Fixes: lp:1783993
* https://bugs.launchpad.net/kicad/+bug/1783993
2018-08-01 12:23:16 +01:00
Jeff Young 98849bde96 Generalize OSX &Cancel fix to work for other languages.
Fixes: lp:1784350
* https://bugs.launchpad.net/kicad/+bug/1784350
2018-08-01 10:56:45 +01:00
Jeff Young 4e3c84e733 Score leaf nodes in LIB_TREEs, not just symbols & footprints.
Fixes: lp:1783251
* https://bugs.launchpad.net/kicad/+bug/1783251
2018-08-01 09:35:46 +01:00
Jeff Young f8a5e2c1c8 Performance enhancements in fp loading, string cmp, etc.
Knocks about 1/3 off the first footprint load, and more than 1/2
off subsequent loads.
2018-08-01 09:35:46 +01:00
Jeff Young 0a35c5c97e Convert Footprint Editor to component tree.
Fixes: lp:1784178
* https://bugs.launchpad.net/kicad/+bug/1784178

Fixes: lp:1780363
* https://bugs.launchpad.net/kicad/+bug/1780363
2018-08-01 09:35:46 +01:00
Jeff Young b400565880 Convert Place Footprint to component tree. 2018-08-01 09:35:45 +01:00
Jeff Young 97f7bd4cb9 Push component tree down into common.
Precondition to reusing component tree for footprints.
2018-08-01 09:35:45 +01:00
Mark van Doesburg 91e3d21d68 Eeschema: Copy attributes from eagle.
Eagle allows for variants of components to be listed in the schematic.
This patch copies the variant data into the imported schematic item,
prefixing the alternate variant names with "VARIANT_" and keeping the
alternate values.
2018-07-31 11:58:01 -07:00
jean-pierre charras 5a2e171f9e fix a few wxWidgets asserts. 2018-07-31 13:16:58 +02:00
Seth Hillbrand d8abfcf827 Revert "Extend swig definitions to contain SHAPE_LINE_CHAIN and VECTOR2I"
This reverts commit be0e44e2ae.

Causes build failure with gcc 4.9.2
2018-07-30 10:19:05 -07:00
qu1ck be0e44e2ae Extend swig definitions to contain SHAPE_LINE_CHAIN and VECTOR2I 2018-07-30 08:45:26 -07:00
jean-pierre charras 3a02e54411 Opengl fix: bitmaps having a width not multiple of 4 were incorrectly drawn.
This fix draws a "sub bitmap" having a width multiple of 4.
(The loss of 1 to 3 pixels in horizontal size should be not really noticeable)
2018-07-30 16:19:35 +02:00
Tomasz Wlostowski 516cf47946 OPENGL_GAL: optimized JP's bitmap drawing function to use textures 2018-07-30 00:13:37 +02:00
jean-pierre charras fefc7b8172 GAL canvases: add DrawBitmap(), using a basic brute force algo for OpenGL, and a optimized code for Cairo. In this fix the brute force means draw each pixel as a rectangle. It works fine, but could be optimized. 2018-07-30 00:13:30 +02:00
jean-pierre charras 70d08a2364 Fix incorrect scaling factor to draw the page limits (GAL mode) 2018-07-28 18:36:51 +02:00
jean-pierre charras 3e5cd86288 Fix a few wxWidgets minor asserts. Fix a compil warning 2018-07-28 10:31:04 +02:00
jean-pierre charras 361366bbbc wxHtmlWindow doesn't render HTML text when used only inside our .kiface dll. (Windows and Linux)
* When a wxHtmlWindow is used *only* in a dll/so module, the Html text is displayed
* as plain text.
* this patch forces wxHtmlWinParser initialization to avoid this issue
*see https://groups.google.com/forum/#!topic/wx-users/FF0zv5qGAT0

Fixes: lp:1783544
https://bugs.launchpad.net/kicad/+bug/1783544
2018-07-28 07:19:22 +02:00
jean-pierre charras 46f5d81d6e Fixes in DIALOG_IMAGE_EDITOR (minor bug fix, and code update).
Fixes: lp:1783796
https://bugs.launchpad.net/kicad/+bug/1783796
2018-07-27 16:30:13 +02:00
Jeff Young 3c2c5c38ad Make icon buttons slightly wider for MSW.
Fixes: lp:1783703
* https://bugs.launchpad.net/kicad/+bug/1783703
2018-07-27 14:58:19 +01:00
Jeff Young 40f5ca0bf7 Fix copy/paste error in numeric evaluator.
Fixes: lp:1783991
* https://bugs.launchpad.net/kicad/+bug/1783991
2018-07-27 14:58:19 +01:00
Jeff Young 4dfae16c1b Consolidate to single menu actions for save, revert, etc.
There's no point in having both Save Symbol and Save Library when
only one can be selected at a time.

Also cleans up a bunch of extraneous icons, and fixes a few
copy/paste errors in menus and toolbars.
2018-07-27 14:58:19 +01:00
jean-pierre charras aa17e7919e Fix a serious issue in DIALOG_EDIT_LIBRARY_TABLES, on wxWidgets 3.1.x.
* in DIALOG_EDIT_LIBRARY_TABLES::TransferDataFromWindow(), m_contentPanel->TransferDataFromWindow
* is explicitly called to update library tables.
* Before wxWidgets 3.1.x, m_contentPanel->TransferDataFromWindow is not called by wxDialog::TransferDataFromWindow()
* and explicit call is needed.
* Since wxWidgets 3.1.x, m_contentPanel->TransferDataFromWindow is called by wxDialog::TransferDataFromWindow()
* thus creating two successive calls, not supported by m_contentPanel->TransferDataFromWindow.
* The call to wxDialog::TransferDataFromWindow() was just removed, as it is useless in this dialog
2018-07-27 09:19:20 +02:00
Jeff Young 18d2f95fd5 Attempt to fix reading dimension units from file.
It fails when the decimal separator is a ',', so this change
simplifies the logic to just handle '.' and ','.

Fixes: lp:1782797
* https://bugs.launchpad.net/kicad/+bug/1782797
2018-07-26 21:27:49 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
Jeff Young b5634b1d08 Dialog spacing cleanup. 2018-07-26 15:43:53 +01:00
Maciej Suminski bbfc1eb12c Use quoted file name when opening a PDF file
Fixes: lp:1783667
* https://bugs.launchpad.net/kicad/+bug/1783667
2018-07-26 12:05:05 +02:00
jean-pierre charras 1e43773a95 Fix not understandable comment 2018-07-25 21:01:59 +02:00
jean-pierre charras f13a546c9b Fix a few wxWidgets asserts or alerts. 2018-07-25 20:26:55 +02:00
Jeff Young 822ebf6955 Move symbol management to a standard Save As... model.
Also brings horizontal toolbar in line with Pcbnew and Eeschema.
And updates the EDA_LIST_DIALOG to current practices.

This finishes the removal of the active library concept from the
Symbol Editor (started with the new component tree in 5.0).

Fixes: lp:1740717
* https://bugs.launchpad.net/kicad/+bug/1740717
2018-07-25 14:41:20 +01:00
Maciej Suminski 39d8d143d6 Fixed KIDIALOG freeze
wxDialog calls Show(false) when the dialog is about to be closed, but
KIDIALOG::Show() implementation did not forward the show parameter to
wxRichMessageDialog::Show() invocation. As the parameter was not
specified, the mentioned Show() call always used 'true' as the default
parameter, preventing the dialog from being closed.

Fixes: lp:1782999
* https://bugs.launchpad.net/kicad/+bug/1782999
2018-07-25 11:50:04 +02:00
Wayne Stambaugh b8aec37ef1 Fix external check for KISYS3DMOD environment variable.
Fixes lp:1782708

https://bugs.launchpad.net/kicad/+bug/1782708
2018-07-23 12:47:48 -04:00
jean-pierre charras 82d492a840 Better wxASSERT message in OPENGL_GAL::computeBitmapTextSize, if the char is not found in font. 2018-07-23 13:58:13 +02:00
Jeff Young 185b524a62 Support both add-empty and add-browse for 3D models.
Also fixes a bug where the selected row and the grid cursor get
separated after a delete.

Fixes: lp:1782747
* https://bugs.launchpad.net/kicad/+bug/1782747
2018-07-23 01:09:47 +01:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Jeff Young 07a665f4fd Improve validation of symbol fields editor.
Don't beep when inserting character from focused grid cell (but
before editor is opened).

Handle reference validation separately from name validation and
separately from user field value validation.  The old way of setting
the fieldId on the validator wasn't working because the validator
gets copied.

Run validation when leaving cell.  Don't just check for empty
(particularly for fields that CAN be empty).

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

(cherry picked from commit 79e04de)
2018-07-21 21:28:13 +01:00
Jeff Young 5c646119a7 Allow user-specification of dimension units.
Also fixes a units bug when round-tripping a dimension through
the file format.

Fixes: lp:1782797
* https://bugs.launchpad.net/kicad/+bug/1782797
2018-07-21 13:50:21 +01:00
Jeff Young 06ea7cdb79 Don't sends events during initialization of UNIT_BINDER.
It can get us in all sorts of trouble.

Fixes: lp:1782855
* https://bugs.launchpad.net/kicad/+bug/1782855
2018-07-21 09:42:12 +01:00
Jeff Young c1df78d531 Finish project frame library table editing.
Fixes: lp:1782761
* https://bugs.launchpad.net/kicad/+bug/1782761
2018-07-20 18:48:06 +01:00
Jeff Young bd90341e91 Add Footprint & Datasheet buttons to Edit Symbol dialog. 2018-07-20 18:48:06 +01:00
Jeff Young da35b16392 Allow dialogs to have no parent.
Fixes: lp:1782661
* https://bugs.launchpad.net/kicad/+bug/1782661
2018-07-20 00:07:07 +01:00
Jeff Young eaf5b913b6 Add Manage Symbol and Footprint Library tables to project frame.
Fixes: lp:1780604
* https://bugs.launchpad.net/kicad/+bug/1780604
2018-07-19 21:46:41 +01:00
Jeff Young 829ba27206 Another round of dialog spacing/font adjustments for Windows. 2018-07-18 17:59:05 +01:00
Jeff Young 879ffa4d1c Adjust dialog spacing for Windows. 2018-07-17 22:18:27 +01:00
Seth Hillbrand 840ad7f680 Add SH_ARC collisions 2018-07-17 10:08:13 -07:00
Jeff Young 65d72e1c11 Fix compile errors on non-GCC compilers.
Fixes: lp:1782148
* https://bugs.launchpad.net/kicad/+bug/1782148

(cherry picked from commit 2ada8fa)
2018-07-17 15:14:31 +01:00
Jeff Young 977f27f3c4 Adjust spacing on preference panels.
Giving them the correct parent changed the spacing.

(cherry picked from commit 7f602f3)

(cherry picked from commit 718db46)
2018-07-17 15:14:25 +01:00
Jeff Young 909f850d16 Give panels the correct parent (the treebook, not the dialog).
(cherry picked from commit 7338533)

(cherry picked from commit 3ce75be)
2018-07-17 15:14:19 +01:00
Jeff Young a52605957e Reduce verbosity in netlist updating messages.
Fixes: lp:1615755
* https://bugs.launchpad.net/kicad/+bug/1615755

(cherry picked from commit 798efbd)
2018-07-17 15:13:51 +01:00
Jeff Young 34857d06c4 Create CvPcb's footprint viewer through Kiway().Player()
This allows it to participate in Kiway things such as updating
language or common settings.

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

(cherry picked from commit b3f8478)
2018-07-17 15:13:31 +01:00
Jeff Young df863e44e2 Wire m_showPageLimits control up to GAL canvas.
Fixes: lp:1499285
* https://bugs.launchpad.net/kicad/+bug/1499285

(cherry picked from commit 4cb7442)
2018-07-17 15:13:29 +01:00
Jeff Young d5e88f574f Clean up units infrastructure after g_UserUnit removal.
Fixes: lp:1538239
* https://bugs.launchpad.net/kicad/+bug/1538239

(cherry picked from commit 96d7178)
2018-07-17 15:12:36 +01:00
Jeff Young aab97c8385 Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

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

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

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

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

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

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

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

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

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

(cherry picked from commit 3944a5e)
2018-07-17 15:12:34 +01:00
Jeff Young 5f3ee1e7ce More g_UserUnit erradication.
(cherry picked from commit 3f08780)
2018-07-17 15:12:31 +01:00
Jeff Young ae2cb331b1 Merge PCBnew text edit dialogs.
(cherry picked from commit 63b7738)
2018-07-17 15:12:24 +01:00
Jeff Young ef3e045a9b Eradicate g_UserUnit from ERC/DRC.
(cherry picked from commit 98b8cd4)
2018-07-17 15:12:16 +01:00
Jeff Young 2ff414adb4 Simplify Move Exactly and Postion Relative dialogs.
Also removes g_UserUnit references.

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

(cherry picked from commit 1639636)
2018-07-17 15:12:11 +01:00
Jeff Young 5ce0f8ba54 Kill off a few more g_UserUnit references.
(cherry picked from commit 452b1a7)
2018-07-17 15:12:07 +01:00
Jeff Young a7b3fac7b5 Remove colours from message text items.
Fixes: lp:1674015
* https://bugs.launchpad.net/kicad/+bug/1674015

(cherry picked from commit 125d5b7)
2018-07-17 15:11:40 +01:00
Jeff Young 3e062867de Move all the grid workarounds into our own WX_GRID class.
(cherry picked from commit 08b4463)
2018-07-17 15:11:38 +01:00
Jeff Young 06bf958bf1 UNIT_BINDERize eeschema's plot and text edit dialogs.
(cherry picked from commit 298ea70)
2018-07-17 15:11:26 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young 1569842927 Pad properties usability enhancements.
Also includes conversion to UNIT_BINDER for pad properties and
pad primitives properties dialogs.

(cherry picked from commit 4a051da)
2018-07-17 15:11:06 +01:00
Jeff Young 0010ad37d1 In-place editing for footprint TEXTE_MODULEs.
Fixes: lp:1102168
* https://bugs.launchpad.net/kicad/+bug/1102168

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

(cherry picked from commit 83781ab)
2018-07-17 15:11:04 +01:00
Jeff Young 8f0aa68ab8 Fold 3D Search Paths dialog into Configure Paths.
Use in-place editing for both.

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

(cherry picked from commit 33622cd)
2018-07-17 15:11:01 +01:00
Jeff Young 124c6d9857 Add in-place editing and validation to Design Rules.
Includes UNIT_BINDER transition and some general layout cleanup.

(cherry picked from commit 282119e)
2018-07-17 15:10:55 +01:00
Jeff Young 31aebe6920 UI infrastructure enhancements and bug fixes.
Work around wxWidgets failure to send first key through validator.

Unify treatment of INDETERMINATE values (such as for multiple
selections with mixed values).

(cherry picked from commit 7308729)
2018-07-17 15:10:15 +01:00
Jeff Young f7861c90ec Use more self-documenting names for conversion routines.
In particular, make sure no one thinks the low-precision ones are
OK for dialogs and/or files.

(cherry picked from commit bc1fcfa)
2018-07-17 15:10:13 +01:00
Jeff Young f5d70644f2 If you want to look at old code, use GIT.
(cherry picked from commit 42d3315)
2018-07-17 15:10:11 +01:00
Jeff Young bcd9a7745d Make the pin table editable.
Also adds generic icon + text grid renderer and grid editor.

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

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

(cherry picked from commit 067f777)
2018-07-17 15:10:06 +01:00
Jeff Young 7be85deb32 GRID_TRICKS improvements.
Allow copy of a single cell demarcated by the grid cursor.

Paste of lib_table s-expressions should always start at 0,0.

Let caller or specialized sub-class do auto-sizing; don’t
do it from within the base GRID_TRICKS.

Don’t start GRID_TRICKS menu IDs at -1; wxWidgets doesn’t
like it when you get to 0.

Add column visibility menu.

(cherry picked from commit e5071ed)
2018-07-17 15:10:03 +01:00
Jeff Young f0f9e4a1cb Kicad-ize the numeric evaluator.
Naming conventions, code formatting, and wxStrings.

(cherry picked from commit 4a0d7a8)
2018-07-17 15:10:01 +01:00
Jeff Young 0f78f97232 Get rid of 5.0 dialog focus hacks.
It's time to fix the focus issues.  This adds a new SetInitialFocus()
routine to DIALOG_SHIM which will need to be called from a lot of
dialogs.

(cherry picked from commit 6d9647a)
2018-07-17 15:09:58 +01:00
Jeff Young a39fb03822 Remove some references to g_UserUnit
(cherry picked from commit 614d832)
2018-07-17 15:09:56 +01:00
Jeff Young 74acb76e7f Switch UNIT_BINDER and DIALOG_SHIM to local units.
The general idea is to support user-units inheritance.  The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.

The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.

As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.

This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.

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

(cherry picked from commit c8bc53e)
2018-07-17 15:09:53 +01:00
Jeff Young 4f8c546140 Implement user units uniformly in EDA_DRAW_FRAME
Step 1 of the g_UserUnit global eradication.  This commit includes
basic hookup of hotkeys, units tool-buttons and grid dialogs.

(cherry picked from commit e0500ab)
2018-07-17 15:09:51 +01:00
Jeff Young 6ad37972c0 Don't center objects behind the DRC dialog.
(cherry picked from commit d5bb39f)
2018-07-17 15:09:43 +01:00
Jeff Young 3e190cee4b Implement selection brightening for DRC.
The old item pointers (which aren't safe to keep around) were
removed in favour of opaque references (void*) which are then
compared against existing items when needed.

Also improves brightening by brightening the whole footprint
(ie: its pads, drawings, reference and value) rather than just
its target cross.

(cherry picked from commit 30e90b0)
2018-07-17 15:09:40 +01:00
Jeff Young e9d877914d Dialog consistency and beautification.
Small icons for dialog browse, refresh, and row operations.
Icons in B&W so they don't over-emphasize with respect to other
controls in the dialog.

Layout cleanup for consistency.  Removal of the blank space to
left of the fields list in the Global Fields Editor, and addition
of column-sizing-to-list-width.

More even spacing for buttons in html report panel.

Honor platform conventions for action button order and layout.

Move netlist importer to update-pcb-from-schematic algorithm
(display messages and then update instead of "dry run" checkbox)

(cherry picked from commit b21e19d)
2018-07-17 15:09:01 +01:00
Carsten Schoenert e81faa2d5f fix misspelled 'allow to' -> 'allow one to' 2018-07-11 10:35:14 -04:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04:00
Carsten Schoenert 9a13dd48af fix misspelled 'Toogle' -> 'Toggle'
A small typo fixup for misspelled word Toogle.
2018-07-11 10:34:53 -04:00
Martin Aberg 9b1f2447b6 fp_lib_table: explicit assumption by assert
This commit makes an implicit assumption explicit by describing it with
an assert.

Fixes lp:1778426

https://bugs.launchpad.net/kicad/+bug/1778426
2018-06-29 19:36:58 -04:00
Seth Hillbrand 4af699e919 hotkeys: Don't import v4 hotkeys automatically
Hotkey options have shifted some options from context-specific to global
hotkeys.  This causes conflicts with old hotkey definitions.  Instead,
we keep the v5 eeschema/pcbnew hotkeys completely separate.  Users can
still import their custom hotkey files from v4.

Fixes: lp:1778408
* https://bugs.launchpad.net/kicad/+bug/1778408
2018-06-29 11:20:11 -07:00
Simon Richter d3deaf5ff5 Rewrite test for valid characters in names
The ternary operator decays array arguments to pointers, so they can no
longer be assigned to array references.
2018-06-29 09:42:10 +02:00
Seth Hillbrand 76f151b4d8 Fix issue with prev d83cff63f
Corrected the new/delete idiom
2018-06-27 16:40:57 -07:00
Seth Hillbrand d83cff63f6 fix memory leak
When staging a commit for an object that has already been modified,
there is a Clone() made for the hypothetical entry.  We need to free it
if we are not storing a new entry.
2018-06-27 16:15:27 -07:00
Seth Hillbrand d30ac2967a eeschema: Rescue symbols with illegal chars
When parsing component names, we need to account for the possibility of
illegal characters (e.g. "/", ":") in the names from v4 libraries.  They
are fixed internally by the cache parser but if we don't fix them
in the rescue routine, the symbol won't match it's cache name.

This standardizes all schematic illegal character routines into LIB_ID

Fixes: lp:1774774
* https://bugs.launchpad.net/kicad/+bug/1774774
2018-06-27 14:15:30 -07:00
Maciej Suminski f10aa6c857 Use paths relative to the executable on Windows
Paths based on DEFAULT_INSTALL_PATH do not work on Windows,
as in fact there is no default install path, as in case of Unix-based
systems. In such case, the initial paths point to mingw subdirectories
that normally do not exist on user machines.

The patch changes the initial path values to make them relative to
the executable and follow the current Windows installer scheme.

Fixes: lp:1775796
* https://bugs.launchpad.net/kicad/+bug/1775796
2018-06-27 11:02:48 +02:00
Andrzej Wolski 1f6f76beb9 Fix overbar drawing for non-italic text
Overbar was always indented inward, regardless if text was italic or not.
2018-06-24 12:01:10 -04:00
Maciej Suminski 73a8d2a9d5 OPENGL GAL: Fixed the iteration condition when drawing triangulated polyset
The loop used an incorrect variable size as the loop limit,
occasionally causing out of bounds accesses.

Fixes: lp:1778288
* https://bugs.launchpad.net/kicad/+bug/1778288
2018-06-23 02:05:21 +02:00
Maciej Suminski 1751e4631c Code formatting 2018-06-23 01:59:49 +02:00
Andrzej Wolski a7cd62ad12 Save through hole pads color to config file
TH Pads color is now user settable, so should be saved in config file.
2018-06-22 11:34:56 -04:00
Seth Hillbrand a1ef441dd9 origin viewitem needs to account for size zoom
The origin item doesn't have a fixed size.  It is constant on the screen but
changes the effective BBox size based on the zoom level.
But we can't simply set it to the maximum size as this causes a splitting degeneracy
when compiling for Debian i386.  By modestly adjusting the bbox, we avoid the degeneracy
while keeping the origin visible at all zoom levels

Fixes: lp:1777379
* https://bugs.launchpad.net/kicad/+bug/1777379
2018-06-20 12:08:57 -07:00
Wayne Stambaugh 8394e2b71e Fix broken LIB_ID library nickname illegal character tests.
During the symbol library table implementation, the legal character
tests for the footprint library table were changed and the forward
slash '/' character became illegal.  This change broke editing some
users footprint library tables that already had '/' in library table
nicknames.  This change split the library nickname and library item
name illegal character tests.
2018-06-20 14:36:40 -04:00
Jeff Young 79e0bb08d0 Architecturally-simpler fix for grid context menu unit changes.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-20 16:54:24 +01:00
Maciej Suminski 44337dec56 pcbnew GAL: Fix bouncing zoom on mouse wheel scroll in Windows
Handling wxEVT_SCROLLWIN_LINE{UP,DOWN} executes the scroll event handler
too many times causing zoom bounces.

Fixes: lp:1562173
* https://bugs.launchpad.net/kicad/+bug/1562173
2018-06-20 16:55:14 +02:00
jean-pierre charras f52763f22b Legacy canvas: fix issue when zooming in/out using mousewheel: slightly shifts screen up/down.
It happens only when the 'warp and center cursor on zoom' option is disabled.

Was created after modifying the code in EDA_DRAW_FRAME::AdjustScrollBars(),
making EDA_DRAW_FRAME::RedrawScreen2() not working very well.

(partial fix of bug 1562173)
2018-06-19 19:53:00 +02:00
Jeff Young 3c7b91b96a Always create grid menu so units are up-to-date.
Fixes: lp:1777519
* https://bugs.launchpad.net/kicad/+bug/1777519
2018-06-19 10:52:36 +01:00
Alexis Lockwood 860a95ca30 Correct my name in AUTHORS.txt and About dialog 2018-06-13 23:10:27 -06:00
jean-pierre charras 5411b951ae Minor compil warning (signed/unsigned compare) fix 2018-06-13 08:05:10 +02:00
Seth Hillbrand bc7bd107d9 Fix a number of untranslated strings. 2018-06-12 17:05:25 -07:00
Seth Hillbrand 5de246c5be Add handlers for scrollbar events
Fixes: lp:1776120
* https://bugs.launchpad.net/kicad/+bug/1776120
2018-06-12 08:53:50 -07:00
Maciej Suminski 813c1a2ba2 Dealing with inconsistent wxGLCanvas::IsDisplaySupported()
wxGLCanvas::IsDisplaySupported() handles wxGL_{MINOR,MAJOR}_VERSION
attributes only in 3.0.4. Since 3.1.0 the attributes are apparently not
supported, so instead wxGLContext::IsOK() is used (introduced in 3.1.0).

Fixes: lp:1775995
* https://bugs.launchpad.net/kicad/+bug/1775995
2018-06-11 12:26:59 +02:00
Damien Espitallier 0e3be5776c Add library name pseudo-hash in fp_list_table GenerateTimestamp output 2018-06-09 16:18:40 +01:00
Jeff Young b9874da3a6 Remove background fp loading from Choose Symbol dlg.
There are a bunch of problems with event processing and closing
documents, etc., when enabled.  See the bug report for more
info.

Fixes: lp:1774777
* https://bugs.launchpad.net/kicad/+bug/1774777
2018-06-09 00:51:39 +01:00
Seth Hillbrand 7d62f14dd0 Set ViewBBox to viewitem size
Limit the bbox size of origin view item to item size.  This prevents
excessive redraw.

This also side-steps a degeneracy in the RTree calculation under certain
conditions in i386 where multiple, maximum-sized items are degenerate.

Fixes: lp:1774316
* https://bugs.launchpad.net/kicad/+bug/1774316
2018-06-05 15:35:58 -07:00
John Beard 58814e838d Common: Fix -Wcatch-value warnings (catching exceptions by value)
This fixes some warnings on GCC 8.1:

warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
         catch( std::out_of_range )
                     ^~~~~~~~~~~~

This fix is along the same lines as:

* ff1802d7a "Fix Coverity "Big parameter passed by value" warnings"
2018-06-05 11:46:17 +02:00
Seth Hillbrand f95b77b61a Fix overflow on 32-bit machine
Bitmap hash incorrectly shifted by 60 bits on 32 bit machines while only
shifting 28 bits on 64 bit machines.
2018-06-04 16:41:16 -07: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
Wayne Stambaugh 7343e78347 Fix some Coverity uninitialized field warnings.
Fixes Coverity CIDs:

- 175824
- 169337
- 163191
- 175827
- 175440
- 175438
- 157136
2018-06-04 13:48:57 -04:00
Maciej Suminski 6bd708621b Early check of supported OpenGL version 2018-06-04 12:17:58 +02:00
jean-pierre charras 8f984c2899 OpenGL, DrawGrid(): use grid and axis alpha color value setting, instead of the fixed 1.0
In Cairo mode, this function uses already the alpha color value setting.
Now for low alpha values (usually they are low, as said in many GAL comments),
Cairo mode and OpenGL mode should have a similar look.
2018-06-01 18:29:04 +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
Seth Hillbrand fe1f837d0c Limit zoom out
We limit the minimum zoom to Z=0.3.  Minimum preset zoom level is 0.31,
so 0.3 is only reachable using the mouse wheel.  Smaller than 0.18, GAL
does not display properly.

Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-30 11:24:35 -07:00
Seth Hillbrand eeb273faa0 Partial revert of 3804f6 to correct assert change
ToLayerID function converts to PCB_LAYER_ID and needs to check against
that enum instead of GAL_LAYER_ID.
2018-05-30 09:17:51 -07:00
jean-pierre charras 71e64de3a4 gerber plot: fix incorrect string attribute for BGA pads on copper layer 2018-05-29 12:30:52 +02:00
jean-pierre charras c614f73c50 HPGL plotter fix incorrect scaling factor
A 0.4% scale error in hpgl plots was previously existing since a long time.

Fixes: lp:1772828
https://bugs.launchpad.net/kicad/+bug/1772828
2018-05-25 20:50:00 +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
Maciej Suminski 32f599654f Fixed normalizeAbsolutePaths() condition
normalizeAbsolutePath() used an invalid condition to
verify that the tested paths are on the same volume.
2018-05-25 11:07:51 +02:00
Maciej Suminski adc61024d3 DIALOG_FILE_DIR_PICKER: dialog to select both files and directories
wxWidgets offers two dialog types: wxFileDialog and wxDirDialog, one
to select files, the other to select directories, but neither of them
handles both. DIALOG_FILE_DIR_PICKER fills that gap.
2018-05-25 08:51:45 +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
jean-pierre charras 3893c43eb0 Fix compil issues. 2018-05-23 11:31:13 +02: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
Jeff Young 2b22cbe94d Release mouse before closing HTML_MESSAGE_BOX.
Fixes: lp:1772275
* https://bugs.launchpad.net/kicad/+bug/1772275
2018-05-21 13:18:41 +01:00
Wayne Stambaugh 5678a166ee Fix template path bugs.
Remove KICAD_PTEMPLATE environment variable as it's purpose was not
clear and was often poorly defined as the path to the KiCad installed
templates.

Add a new KICAD_TEMPLATE_DIR environment variable which clearly should
be the path of the KiCad installed templates.  Make this environment
variable available in the user settings in case the default is wrong
which has been the case in some instances.  Use the standard search
stack to set the default system template path which has a much greater
chance of being correct.

Add a new KICAD_USER_TEMPLATE_DIR environment variable which clearly
should be the path of the user defined templates.  Users most likely
were not even aware of the old default user path unless they read the
fine manual.

Set template path search stack priority as follows:

* KICAD_USER_TEMPLATE_DIR
* KICAD_TEMPLATE_DIR
* Search stack template paths

Reverse template selection dialog and project path dialog for improved
user experience.

Fixes lp:1543443

https://bugs.launchpad.net/kicad/+bug/1543443
2018-05-20 18:56:11 -04:00
Jeff Young 63c9e11aae Bug fixes in Length Tuning UI.
1) hide the status popup when the dialog is brought up
2) forward events from the popup to the canvas so hotkeys work
3) make sure diff pair radius is always 100%
4) fix greyed-out Miter style label
5) make L a hotkey so it works before you start dragging

Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-20 23:48:29 +01:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

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

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
Seth Hillbrand d22fceca7c Revert hotkey save format
This reverts the hotkeys file format to a human readable and VCS
compatible listing by splitting individual hotkey assignments onto
separate lines instead of the single key. This unifies the hotkey format
between the application configuration and export Hotkey routines.

Both hotkey formats remain readable by the same routines.
2018-05-18 12:53:45 -07:00
jean-pierre charras ec98bbba11 Fix issue: HPGL (plot mode sketch) : polygons are not closed.
Fixes: lp:1771531
https://bugs.launchpad.net/kicad/+bug/1771531
2018-05-18 10:13:46 +02:00
jean-pierre charras 1ebee39973 Gerber X1 format: add more structured comments in file. 2018-05-17 17:32:35 +02:00
jean-pierre charras d1cab6ec62 Gerber X1 plot files: prepare adding more structured comments (aperture and object attributes)
structured comments are lines starting by "G04 #@!" and are therefore Gerber X1 comments.
But these comments contain X2 attributes.
2018-05-17 17:32:35 +02:00
Maciej Suminski dfcdfe91fa Fixed the TOOL_STATE::idle field setting condition
The tools were being set as idle, whenever an event handler execution
finished (via TOOL_MANAGER::finishTool()). Such approach does not take
into account cases when a tool is active and receives an event causing
another event handler of the same tool to run. When this happend, the
tool has been incorrectly set as idle when the second handler finished
its execution.

In a particular case, invoking the router settings dialog caused the PNS
router to be incorrectly detected as inactive in
EDIT_TOOL::invokeInlineRouter(). Due to that, ROUTER_TOOL::CanInlineDrag()
requested a selection that required disambiguation menu for items
that were modified by the router, but not yet committed. After the drag
tool had finished, the disambiguation menu was eventually shown
with items existing only in the undo buffer. Removing such item lead to
track DLIST corruption, effectively erasing all tracks.

Fixes: lp:1767826
* https://bugs.launchpad.net/kicad/+bug/1767826
2018-05-17 16:24:13 +02:00
jean-pierre charras 93e75af388 Rename plot_auxiliary_data.h file to gbr_metadata.h, according to the class names defined by this file 2018-05-17 08:07:29 +02:00
jean-pierre charras 828faecce9 Modify the priority of OCC/OCE include paths.
This is because on my msys2/32bits the OCE config.h file replaced our kicad config.h, due to include paths priorities
2018-05-16 17:30:37 +02:00
Seth Hillbrand 584409b2ef Make OpenCascade more secondary
The opencascade patch intrusively checked against libraries but broke
some build scripts.  This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
2018-05-15 06:40:25 -07:00
jean-pierre charras 6e5131be5a Minor fix in fp editor and fp viewer: display the fp info instead of the useless board info.
board info makes sense only in board editor, not in fp editor and fp viewer.
2018-05-12 10:44:31 +02:00
Seth Hillbrand 2bab30d9ac Allow Kicad to use OpenCascade
Adds the option of using OpenCascade not just the community edition.

Fixes: lp:1628950
* https://bugs.launchpad.net/kicad/+bug/1628950
2018-05-11 17:04:32 -07:00
Seth Hillbrand 6a726ca299 Unify polygon point checks
Mutliple checks are made for point in polygons/closed line chains.  This
unifies the checks to a single (hopefully) place for improved debugging.
2018-05-11 15:42:41 -07:00
Seth Hillbrand f2aea97807 Calculate inside polygon using points
Minor improvement in polygon calculation to use consecutive points
rather than casting to a full segment.  Avoids division except when it
will not create a denormal.
2018-05-11 15:42:41 -07:00
Seth Hillbrand d67821d771 Add a clearance check for closed shape line chains
Also improves speed of multiple point checks by first eliminating points
outside of the BBox.
2018-05-11 15:42:41 -07:00
Jeff Young 62d6750ced Use default for attribute "display" if not found.
Fixes: lp:1767447
* https://bugs.launchpad.net/kicad/+bug/1767447
2018-05-11 16:11:38 +01:00
Maciej Suminski f73b9a55a7 Fixed an assert in DHEAD::append()
The previous one incorrectly expected the appended items to belong to
the target list, instead of the source list.
2018-05-11 10:23:40 +02:00
Jeff Young a65088419e More forgiving keyword search.
In particular, allow comma separators in footprint filters without
making users type them in when searching.

Fixes: lp:1391533
* https://bugs.launchpad.net/kicad/+bug/1391533
2018-05-10 12:16:00 +01:00
Seth Hillbrand b90f70e230 Update footprint filter type-in to be implicit *
Footprint filter provides two Regex filtering options.  One for keywords
and one for footprint keywords.  The footprint keywords (contained in
the symbol files) need explicit '*' at the beginning and end of the
filters to allow matching start/end.  Type-in filters should search
implicitly matching any wildcard substring.

Fixes: lp:1769931
* https://bugs.launchpad.net/kicad/+bug/1769931
2018-05-08 10:44:14 -07:00
Wayne Stambaugh 5c5b74b29e Fix user configuration path bug on Linux.
Recent versions of wxWidgets wxStandardPaths::GetUserConfigDir() correctly
append ".config" on Linux build which was incorrect as the current code
already appended it to the path.  Add a check to see if ".config" is the
last path and append as required.

Check for XDG_CONFIG_HOME environment variable on all platforms not just
Linux.

Fixes lp:1769145

https://bugs.launchpad.net/kicad/+bug/1769145
2018-05-07 18:23:41 -04:00
Maciej Suminski ffe194567a DLIST: extra checks 2018-05-07 17:12:03 +02:00
Maciej Suminski d2d5657aff DLIST: replace wxASSERT with wxCHECK for checks that would lead to a crash
wxASSERT only shows a dialog saying that things went wrong (in debug mode),
whereas wxCHECK will also terminate the function (also in release builds).
2018-05-07 16:52:34 +02:00
Jeff Young aa7da5dfcd Treat ${...} and $(...) envvar references uniformly.
Fixes: lp:1769282
* https://bugs.launchpad.net/kicad/+bug/1769282
2018-05-05 23:40:40 +01:00
Jeff Young c23b263e39 Fix display issues in Layers list in Keepout Zone Properties. 2018-05-04 23:55:03 +01:00
Steven A. Falco e0ca5bab11 Fix comment typo.
Comment has XDG_CONFIG_HOME, but it should be KICAD_CONFIG_HOME.
2018-05-04 08:28:48 -07:00
Seth Hillbrand b2c4519c2c Setting custom pad shape to be outline for PNS
Changes SHAPE_CONVEX to SHAPE_SIMPLE to better reflect the limitations.
Changes SHAPE_LINE_CHAIN::PointInside calculation to allow points
strictly inside a line chain

Fixes: lp:1768862
* https://bugs.launchpad.net/kicad/+bug/1768862
2018-05-04 08:23:20 -07:00
Jeff Young c842ddfb97 Fix message mismatch in YesNoCancelDialog. 2018-05-02 21:49:57 +01:00
Maciej Suminski 439cc6a967 Remove redundant window scroll event handlers in WX_VIEW_CONTROLS
The only required scroll event handler is wxEVT_SCROLLWIN_THUMBTRACK,
which is responsible for dragging the scrolling sliders. One of the
remaining ones is also called when mousewheel is scrolled (MSW only) and
due to that overrides the new view setting with view settings computed
from the sliders position.

Fixes: lp:1767604
* https://bugs.launchpad.net/kicad/+bug/1767604
2018-05-02 15:39:36 +02:00
Seth Hillbrand 62522ee450 Prevent implicit * from wildcard match in footprint
Footprint filters need to be able to match the start and end of strings.
The standard wildcard filter implictly adds "*" to the start and end of
match strings, so we create a derived class that requires an explicit
"*" or "?" to match wildcards.

Fixes: lp:1751565
* https://bugs.launchpad.net/kicad/+bug/1751565
2018-05-01 16:49:20 -07:00
Jeff Young 8f2fee8bb8 Fix accidental revert. 2018-05-01 21:57:00 +01:00
Jeff Young 75e91f4cfd Make sure Cvpcb doesn't use its own FP_LIB_TABLE.
It's just a vestige of when Cvpcb was a separate app.

Fixes: lp:1768251
* https://bugs.launchpad.net/kicad/+bug/1768251
2018-05-01 21:49:03 +01:00
Shivpratap Chauhan 26197c333e At very first launch, old settings/config does not exist
KiCad read incorrect value for window position and it's size at very
first launch, which results in invisble/inaccessible window on Mac OSX.
Set correct default values for these settings fixes this issue.
And fix a typo in comment.
2018-05-01 09:19:27 -04:00
Wayne Stambaugh 6850e23fe0 Replace printf debugging output in common/project.cpp with wxLogTrace. 2018-04-30 15:18:09 -04:00
Andrzej Wolski 5ac4dbe641 Fix window/crossed selection mode recognition in flipped view
Fixes: lp:1767233
2018-04-30 14:57:38 +02:00
jean-pierre charras 7395949ae0 LIB_ID: fix incorrect detection of illegal chars, when values are not ASCII values.
Fixes: lp:1764055
https://bugs.launchpad.net/kicad/+bug/1764055
2018-04-30 11:46:24 +02:00
Seth Hillbrand 2a87117edc Speed load/unload of complex boards
Corrects an error in polyline estimation

Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.

Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.

Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
2018-04-28 16:11:07 +02:00
Jeff Young 91cfecaa12 Don't allow wxDataViewCtrl updates during model update.
Also checks to make sure libraries are activated before adding
them to the component tree.

Fixes: lp:1765286
* https://bugs.launchpad.net/kicad/+bug/1765286
2018-04-28 10:45:32 +01:00
jean-pierre charras 502bed083d Fix a minimal size for the spice simulator frame.
For an obscure reason, the minimal frame size fixed in EDA_BASE_FRAME was not working.
2018-04-27 20:35:23 +02:00
Jeff Young 942d4e7658 Check footprint history list for validity.
Fixes: lp:1767108
* https://bugs.launchpad.net/kicad/+bug/1767108
2018-04-27 15:26:00 +01:00
Maciej Suminski 7d9dea7897 Remove an excessive assert for Cairo canvas size
It is a C-style assert causing application termination when triggered.
Certain systems display pcbnew window shrinked so much, that the canvas
size is 0x0 pixels. The only problem with that is the window needs to be
resized.

Fixes: lp:1767031
* https://bugs.launchpad.net/kicad/+bug/1767031
2018-04-27 10:06:36 +02:00
Wayne Stambaugh a7528df198 Allow for multiple user configurations.
Use KICAD_CONFIG_HOME environment variable on all platforms so users can
maintain multiple configurations of KiCad.
2018-04-26 08:29:37 -04:00
jean-pierre charras 319908b7f4 fix a compil issue. 2018-04-24 15:20:35 +02:00
Maciej Suminski 143d580596 Fixed relative coordinates reset when a tool forces the cursor position
Fixes: lp:1759044
* https://bugs.launchpad.net/kicad/+bug/1759044
2018-04-24 12:56:19 +02:00
Seth Hillbrand bd5eee50f4 Unify correction factor calculations 2018-04-23 16:43:13 -07:00
Seth Hillbrand dbfa9093ab Adding seg-polyset collision support 2018-04-23 16:43:13 -07:00
Seth Hillbrand b618da1fac Fixing bounding box calc for arcs 2018-04-23 16:43:13 -07:00
Maciej Suminski c960d671cd Changed negative recursion level argument to positive
BEZIER_POLY::recursiveBezier() was called with negated 'level'
variable as an argument which is incorrect for an unsigned type.
2018-04-19 08:39:46 +02:00
Simon Richter 7e47ef7471 Fix warnings for unreferenced local variables 2018-04-18 15:08:37 -04:00
Jeff Young 3be876c388 Cleanup of trace logs from Simon Richter. 2018-04-17 17:27:18 +01:00
Jeff Young 000457db7c Move Fields Editor to wxGrid.
Makes in-place editing much easier and fixes some other issues
(see bug reports).

Fixed sorting bugs in References and added better sorting for
Values.

Removed Description column as it wasn't editable and caused more
confusion than value.

Removed auto-column-width after initial render.

Re-implemented undo/redo.

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

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

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

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

Fixes: lp:1761378
* https://bugs.launchpad.net/kicad/+bug/1761378
2018-04-17 11:39:44 +01:00
Jeff Young 12ec56bc15 Prevent reentrancy in footprint loading.
Also removes parallel implementation in favour of using the
normal one (with a new wxGauge-backed PROGRESS_REPORTER).

Fixes: lp:1764196
* https://bugs.launchpad.net/kicad/+bug/1764196
2018-04-16 23:19:08 +01:00
jean-pierre charras 3e64c9de38 Fix incorrect behavior of ReplaceIllegalFileNameChars( wxString& aName, int aReplaceChar ) for non ASCII8 chars.
(this function was using a comparison using chars to test wide chars)

Fixes: lp:1764055
https://bugs.launchpad.net/kicad/+bug/1764055
2018-04-15 10:06:53 +02:00
Wayne Stambaugh 9b5bbd7c77 Fix wxFileDialog assertion when worksheet file has absolute path.
Fixes lp: 1763887

https://bugs.launchpad.net/kicad/+bug/1763887
2018-04-14 10:51:15 -04:00
Wayne Stambaugh a1acec5f13 Revert broken hotkey fix.
The hotkey fix committed in 53b1ec81 broke non-us keyboards.  Change the
hotkey help hotkey from '?' to Ctrl+F1 to prevent the hotkey list dialog
from being shown when placing a bus wire junction in Eeschema and when
changing the track posture in Pcbnew.  This is still broken in the GAL
framework.
2018-04-14 08:24:25 -04:00
Wayne Stambaugh 81843c37a4 Organize trace debugging code for ease of maintenance. 2018-04-13 09:59:01 -04:00
Maciej Suminski 3f734eb1b5 Improved validation of library and entry names
Symbol/footprint library and entry have the same set of forbidden
characters with a single exception, space character. To accommodate for
this difference, LIB_ID validation and fix methods have been extended to
specify the LIB_ID type that is checked (schematic/board).

LIB_ID::HasIllegalChars() and LIB_ID::FixIllegalChars() had two different
sets of characters treated as invalid in LIB_IDs. The set has been
factored out to another function to avoid duplication.
2018-04-13 14:24:57 +02:00
jean-pierre charras e57435c0fc Fix compil issue (created by commit "Added std::less specialization for wxPoint") with wxWidgets 3.1.1 2018-04-13 11:06:46 +02:00
Maciej Suminski b766dbc7a4 Added std::less specialization for wxPoint
Requried to use wxPoint as key type in maps
2018-04-12 18:09:18 +02:00
jean-pierre charras c421840a9e Cvpcb: avoid crash on start if _pcbnew.kiface (needed by cvpcb) is not found. 2018-04-12 11:07:43 +02:00
Maciej Suminski 0d8692da20 Changed ACTION_MANAGER assert() calls to wxASSERT()
wxASSERT(), contrary to assert() does not terminate the program when
triggered. As assertions in ACTION_MANAGER are not critical and should be
treated as warnings - there is no need to close the program.
2018-04-12 08:47:09 +02:00
jean-pierre charras 4f3b77347a DIALOG_ENV_VAR_CONFIG: allows using lowercase chars when typing an env var name. these lowercase chars are converted to uppercase on the fly.
Previously, lowercase chars were not accepted, and nothing was displayed when trying to type a name in lowercase chars.
2018-04-10 20:23:49 +02:00
Jeff Young d54a252eaa Check zone fills for being out-of-date during DRC. 2018-04-09 11:05:14 +01:00
Carsten Schoenert a11714b1a4 fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
Carsten Schoenert 77b3a662fc fix misspelled 'Allows to' -> 'Allows one to' 2018-04-08 13:24:30 -04:00
Carsten Schoenert 1f32f7c55b fix misspelled 'allows to' -> 'allows one to' 2018-04-08 13:24:18 -04:00
jean-pierre charras 7f6e26e55a DrawGraphicText: remove a static variable, and replace it (when needed) by a new parameter in argument list.
It make this function thread-safe (as far as wxString is thread-safe)
2018-04-07 19:57:26 +02:00
Kristoffer Ödmark fdb6bbab7b Footprint Wizard now also handles custom Env paths 2018-04-06 14:51:09 +01:00
Jeff Young df43f071e1 Keep track of open sockets and dispose of them in d'tor.
Fixes: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
2018-04-04 12:02:40 +01:00
Jeff Young 5e36fe8df7 Move timestamp setting where it will alwasy get set.
Also update the rest of the symbol-chooser usage to current
specs, including examining the timestamp to see if the list
needs loading at all.

Partial fix to: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
2018-04-04 12:02:40 +01:00
jean-pierre charras 70988271c1 WX_TEXT_ENTRY_DIALOG: fix a wxASSERT ( very minor issue in debug mode) 2018-04-04 10:40:27 +02:00
jean-pierre charras f8a3ec4974 Add a method to facilitate Tools handling in main frame toolbars.
Fix also a bug in gerbview_frame.cpp, about a broken toolbar accessor (fortunately not used in current code)
2018-04-03 13:00:20 +02:00
Wayne Stambaugh 4b2ced341e Fix button sizer padding in WX_TEXT_ENTRY_DIALOG. 2018-04-02 18:05:37 -04:00
Wayne Stambaugh 53b1ec8146 Fix track posture hotkey bug on windows.
The change track posture hotkey '/' was getting interpreted as the show
hotkey list shortcut '?' on windows.  This fix is temporary hack to fix
the problem which much more involved than the simple #ifdef/#endif used
to fix this issue.

Add key code tracing to help analyze key codes for future development.
2018-04-02 18:05:37 -04:00
jean-pierre charras 0171547154 Context menu: use same message for Zoom and Grid in Legacy mode and GAL mode.
a minor cosmetic other fix in Eeschema, edit submenu.
2018-04-01 21:09:52 +02:00
jean-pierre charras e750417fa0 Eeschema: fix many wxASSERT when trying to open menus from the main menubar.
This is due to the fact the same ID was used for menuitems in menubar,
and tools in toobars.
Especially, some items were not compatible due to different attributes.

Windows does not accept the same ID for 2 items inside the same frame.
It creates issues (items not shown, Asserts, ...)
2018-04-01 20:58:27 +02:00
Jon Evans e3d9a23867 Properly escape urls passed to wxLaunchDefaultBrowser() 2018-03-30 22:02:13 -04:00
Seth Hillbrand 8bb9084ea9 Revise TestSegmentHit to catch missing hits
Fixes issue where TestSegmentHit falsely skips segments that are
slightly off 45°. Improves speed of function by exiting on non-hits
more quickly. Simplifies function and removes magic numbers.
2018-03-30 17:26:34 -07:00
Maciej Suminski 7483a73a5f Set OK button as the default one in WX_TEXT_ENTRY_DIALOG
Enables accepting the input by pressing the Return key.
2018-03-30 15:29:48 +02:00
Jon Evans b8c282fa6f Don't complain about perfectly-closed polygons as self-intersecting 2018-03-29 22:20:00 -04:00
Jon Evans 081c77f6bd OPENGL_GAL::DrawSegment(): Enforce nonzero width to match Cairo
Fixes: lp:1759958
* https://bugs.launchpad.net/kicad/+bug/1759958
2018-03-29 22:13:46 -04:00
Jon Evans ed99251f0b Add explicit file:// URI scheme for html help files
This fixes the help location on MacOS
2018-03-28 17:18:15 -04:00
jean-pierre charras 6740a37632 move and swap layers: make changes undoable.
minor code cleanup.
2018-03-28 15:30:11 +02:00
Seth Hillbrand 545e6bbd0c Defining time_t for Python
Fixes: lp:1732738
* https://bugs.launchpad.net/kicad/+bug/1732738
2018-03-27 09:43:23 -07:00
Seth Hillbrand ced0fcee1e Updating Eagle Importer to take curved zones
Fixes: lp:1755879
* https://bugs.launchpad.net/kicad/+bug/1755879
2018-03-26 15:09:56 -07:00
Jeff Young 8b94606fb5 Promote selection up context menu hierarchy.
This is so that tools checking for a selected item won't think
the menu has been cancelled if the selection was in a submenu.

Fixes: lp:1758372
* https://bugs.launchpad.net/kicad/+bug/1758372
2018-03-26 20:35:49 +01:00
Jon Evans 1dd4af2972 Sort VIEW_GROUP drawing by layer order
Fixes: lp:1757146
* https://bugs.launchpad.net/kicad/+bug/1757146
2018-03-26 10:18:50 -04:00
Wayne Stambaugh c8c5b5da07 Fix zoom to selection in bug in gal canvas. 2018-03-25 16:12:56 -04:00
Jeff Young f4ce8766e3 Implement shared FOOTPRINT_LIST.
While we already cache the loaded footprint files, parsing said files
into the list is also time-intensive.  Since the FOOTPRINT_LIST is
already hash-stamped against the current timestamps of the files that
make up the list, sharing a single copy of the list is quite
straight-forward.
2018-03-25 19:21:28 +01:00
Jeff Young b24b0d5dfe Dialog-ize CvPcb and implement proper Save.
Save now goes to disk (instead of just the in-memory schemaitc),
and the UI attempts to make this clear.
2018-03-25 19:21:27 +01:00
Wayne Stambaugh 8d8c422a19 Add zoom to selection menu entry to all editors.
Fixes lp:1753339

https://bugs.launchpad.net/kicad/+bug/1753339
2018-03-25 12:34:19 -04:00
Jeff Young 97fffe875f Notify clients when GRID_TRICKS toggles checkboxes. 2018-03-24 13:13:57 +00:00
jean-pierre charras 6940f92469 Fix compil issue and warning on Windows/msys2 2018-03-23 15:07:38 +01:00
Jeff Young 5957bc7dba Make sure checkboxes refresh on Linux. 2018-03-23 13:33:17 +00:00
Jeff Young fbf10e941b Switch zone fillets to absolute-error algorithm.
And some general cleanup to related constants, etc.
2018-03-23 12:46:17 +00:00
Jeff Young a0364a1137 Don't make user click twice to toggle checkbox in wxGrid. 2018-03-23 12:46:17 +00:00
Maciej Suminski 6331f94544 OpenGL GAL: safer error handling
Replaced assert() with wxCHECK(), so in case of problems methods return
instead of continuing with invalid state/data, wherever possible.
2018-03-22 18:20:02 +01:00
Jeff Young 99e659ff54 Coverity fixes. 2018-03-21 23:11:55 +00:00
Maciej Suminski dfd2a8fc48 NumericEvaluator: return false for invalid expressions
Clearing bClError flag in NumericEvaluator::parseOk() made the
expression look valid, even if the flag has been set for a previous
token. Now it is cleared before an expression is parsed and verified
after parser finishes.

Fixes: lp:1756995
* https://bugs.launchpad.net/kicad/+bug/1756995
2018-03-21 17:11:35 +01:00
Jon Evans 3103e3dc4c DRC: Center zoom on marker location, not DRC item start location
For some DRC checks, the location of the marker is not the location
of the first item in the resulting DRC_ITEM, so centering the screen
on PointA of the DRC_ITEM can be confusing.
2018-03-19 22:25:55 -04:00
Maciej Suminski b40bf4c0ea Center DIALOG_SHIM position if it would have appeared off the screen
DIALOG_SHIM stores the dialog position, so every time it is shown, it is
displayed in the same location. This caused problems on multidisplay
setups, as dialogs could show up off the screen if the original display
has been detached in the meantime, effectively making them inaccesible
to the user.

Fixes: lp:1756623
* https://bugs.launchpad.net/kicad/+bug/1756623
2018-03-20 00:02:22 +01:00
Maciej Suminski a42aed3305 Added "Copy" to right click menu in WX_HTML_REPORT_PANEL 2018-03-19 17:15:07 +01:00
Maciej Suminski 17d63dbc1f Fixed text alignment in WX_HTML_REPORT_PANEL 2018-03-19 17:04:38 +01:00
jean-pierre charras 2ff74cb3fc Add support for .gbrjob new file format (JSON format) in Gerbview
Add experimental code to generate .gbrjob files in the new JSON file format
2018-03-19 15:14:20 +01:00
Carsten Schoenert bc1b10bc92 AboutDialog_main.cpp: update the link to the libraries
The KiCad official libraries have now a own dedicated website.
2018-03-18 11:21:24 -04:00
Carsten Schoenert 4723aae18c AboutDialog_main.cpp: re-adding i18n macros
Some strings in the About Kicad dialog are not displayed as translated
strings due the strings not marked as i18n based strings.
2018-03-18 11:21:24 -04:00
Jeff Young e0e0687cd7 Revert "Allow 5.0 to read 6.0 files with hole-to-hole clearance settings."
This reverts commit 0a4c04530a.
2018-03-16 22:22:15 +00:00
Jeff Young b8fd2f3c79 Revert "Don't be pedantic about the file format."
This reverts commit 1537cbc59c.
2018-03-16 18:11:36 +00:00
Jeff Young 1537cbc59c Don't be pedantic about the file format.
It's just another form of nagging.
2018-03-16 16:57:38 +00:00
Jeff Young 0a4c04530a Allow 5.0 to read 6.0 files with hole-to-hole clearance settings. 2018-03-16 00:48:35 +00:00
Jeff Young 3d12a6889b Make sure ERC and DRC item lists respect color themes.
Fixes: lp:1492953
* https://bugs.launchpad.net/kicad/+bug/1492953
2018-03-14 14:15:16 +00:00
Jon Evans 543faa385b PDF Plotter: handle edge-case arc/circle drawing correctly
Fixes: lp:1752771
* https://bugs.launchpad.net/kicad/+bug/1752771
2018-03-13 21:01:06 -04:00
Maciej Suminski 4055c435a5 Eagle PCB import: unified code for handling pad properties 2018-03-13 14:44:35 +01:00
Maciej Suminski 4c9be316dd Eagle import: minor ECOORD refactor
- changed EAGLE_UNIT enum names from EAGLE_* to EU_*
- renamed ToNanoMeters() to ConvertToNm() and added a comment
- added ToMils() and ToNanoMeters() method
2018-03-13 14:44:34 +01:00
Jeff Young f32f14dc8f Add WX_TEXT_ENTRY_DIALOG which inherits from DIALOG_SHIM.
Fixes: lp:1754977
* https://bugs.launchpad.net/kicad/+bug/1754977
2018-03-12 22:45:51 +00:00
Tomasz Wlostowski b1f613071d eeschema: workaround for 64kByte string length limit in wxString::Format() causing segfaults in netlist update under Windows
Fixes: lp:1754402
* https://bugs.launchpad.net/kicad/+bug/1754402
2018-03-12 18:26:25 +01:00
jean-pierre charras 2230abde1b page layout editor: fix a crash on block move.
This crash was due to a pointer initialized to a temporary reference.
Very minor coding style fixes
2018-03-10 10:25:07 +01:00
Seth Hillbrand ea4cee3393 Set Eagle import generated timestamps to KiCad std 2018-03-09 13:12:18 -08:00
Seth Hillbrand 26392f8070 Remove spaces from start of common translated words 2018-03-09 08:40:43 -08:00
Maciej Suminski 30a78f00bc Use 32-bit timestamps for imported Eagle files
Fixes: lp:1754610
* https://bugs.launchpad.net/kicad/+bug/1754610
2018-03-09 14:27:35 +01:00
jean-pierre charras 51fe063524 Circle to polygon conversion: a few enhancements:
* Remove duplicate code
* fix incorrect formulas is some places
* add comments
2018-03-09 13:28:47 +01:00
Jon Evans 9c62792245 SVG Plotter: Handle edge-case arc and circle drawing 2018-03-08 22:44:26 -05:00
Jon Evans 921e68107b OpenGL: Make circle/arc drawing match Cairo for some edge cases 2018-03-08 22:04:33 -05:00
Jeff Young f1b48eb4f4 Fix default button and focus for ModEdit save.
Fixes: lp:1752546
* https://bugs.launchpad.net/kicad/+bug/1752546
2018-03-09 00:52:45 +00:00
Jeff Young 4693fd6200 Resolve env vars when looking up documentation files.
Fixes: lp:1729276
* https://bugs.launchpad.net/kicad/+bug/1729276
2018-03-08 23:51:10 +00:00
Seth Hillbrand a607174f9a Fix english grammar 2018-03-08 12:33:32 -08:00
Jeff Young 182b134872 Don't overwite env vars with settings.
Fixes: lp:1740022
* https://bugs.launchpad.net/kicad/+bug/1740022
2018-03-08 19:17:31 +00:00
Maciej Suminski 0bdae22af7 ResolveFile() handles absolute paths
Fixes: lp:1753094
* https://bugs.launchpad.net/kicad/+bug/1753094
2018-03-08 11:35:27 +01:00
Maciej Suminski 9ce768c29a Modified STROKE_FONT::ComputeStringBoundaryLimits() to process multiline strings
Removed a declaration of a not existing method (STROKE_FONT::ComputeTextLineSize()).

Fixes: lp:1747967
* https://bugs.launchpad.net/kicad/+bug/1747967
2018-03-08 10:56:34 +01:00
Maciej Suminski dfc47464d7 Added ReplaceIllegalFileNameChars() for wxString& 2018-03-08 09:06:15 +01:00
Jeff Young 2b34426c36 Only set always-show-scrollbars in constructor on Mac.
Fixes: lp:1753592
* https://bugs.launchpad.net/kicad/+bug/1753592
2018-03-06 20:31:44 +00:00
Maciej Suminski aff350f593 LIB_ID: change strcpy() to strncpy() for safety 2018-03-06 14:25:18 +01:00
Jeff Young 90e2c8dd7f Get rid of first-scroll jerkiness in eeschema. 2018-03-05 00:07:50 +00:00
Maciej Suminski f7158e834d Created STDOUT_REPORTER class for debugging 2018-03-04 16:45:42 +01:00
Jeff Young 284c346828 Don't cache github libraries above nginx server.
It's too expensive to fetch the timestamps when the github
server is busy.  See Dick Hollenbeck's comments at the top of
github_plugin.cpp for more info.

Also adds some safety to the other caching algorithms after
seeing github_plugin's wild-west usage of the kicad_plugin.

Fixes: lp:1753143
* https://bugs.launchpad.net/kicad/+bug/1753143
2018-03-04 01:16:59 +00:00
Tomasz Włostowski af7064ef89 pcbnew: synchronize zone visibility view menu entries with the toolbar buttons 2018-03-03 17:38:28 +01:00
Seth Hillbrand e6245c5c5a Fix type comparison warning 2018-03-02 17:08:01 -08:00
Maciej Suminski 3f1a3fe65b Derive DIALOG_MULTI_OPTIONS from wxMultiChoiceDialog 2018-03-02 18:09:27 +01:00
Maciej Suminski be13bb0013 Refactored SelectSingleOption() to take advantage of wxSingleChoiceDialog. 2018-03-02 17:43:59 +01:00
Maciej Suminski 18167f829a Derive KIDIALOG from wxRichMessageDialog
wxRichMessageDialog already offers a dialog with a checkbox, so
the custom dialog setup code is not necessary anymore.
2018-03-02 17:05:35 +01:00
Maciej Suminski 1d5df8e975 Renamed KI_DIALOG to KIDIALOG 2018-03-02 11:57:03 +01:00
Maciej Suminski 52fcddf4f4 Allow drawing self-intersecting polygons, just display a warning
Fixes: lp:1751654
* https://bugs.launchpad.net/kicad/+bug/1751654
2018-03-02 10:58:43 +01:00