Commit Graph

4254 Commits

Author SHA1 Message Date
jean-pierre charras 238abad004 Gerber job file: fix incorrect GUID.
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:16:07 +01:00
Jeff Young fec8ab372e Don't set the viewport when switching screens.
That's the job of ZoomAutomatique().

Fixes: lp:1799436
* https://bugs.launchpad.net/kicad/+bug/1799436
2018-11-04 19:17:53 +00:00
Jeff Young 589e1f6a96 MSW and GTK need a separate dialog for opening/saving directories.
Fixes: lp:1801528
* https://bugs.launchpad.net/kicad/+bug/1801528
2018-11-04 12:35:01 +00:00
Jeff Young 3bfd32cdc5 Inherit grid settings from PCBNew.
Fixes: lp:1801428
* https://bugs.launchpad.net/kicad/+bug/1801428
2018-11-04 12:35:01 +00:00
Jeff Young d7ff3f8af5 Allow text on margin layer. 2018-11-02 19:55:30 +00:00
jean-pierre charras a55950bd68 DIALOG_COLOR_PICKER_BASE: fix a minor wxWidgets alert. 2018-11-01 16:51:14 +01:00
Maciej Suminski 08814b0512 Small layout adjustments in DIALOG_PRINT_GENERIC 2018-10-31 19:17:30 +01:00
Maciej Suminski ca1687d7ce Fixed disabling the block title for footprint editor printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski afda69c9cc Removed default line width setting from the printing dialog 2018-10-31 19:17:30 +01:00
Maciej Suminski cbf7d708b2 pcbnew: Draw title block normally even when the view is flipped 2018-10-31 19:17:30 +01:00
Maciej Suminski 64da77538f Fix bitmap scale in printouts
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
2018-10-31 19:17:30 +01:00
Maciej Suminski 7ab8171422 Disabled translucency in printouts as it is not supported by cairo 2018-10-31 19:17:30 +01:00
Maciej Suminski 42c5fc0ef8 Link GDI+ library when building libgal 2018-10-31 19:17:30 +01:00
Maciej Suminski 3d15092643 Fixed loading layer visibility setting for printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 90b6156448 Store line width setting for printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski b727b310b4 Fix 'fit to page' for print outs 2018-10-31 19:17:30 +01:00
Maciej Suminski d3ea63e133 Removed a redundant parameter from BOARD_PRINTOUT constructor 2018-10-31 19:17:30 +01:00
Maciej Suminski dea778842b Grand printing dialogs refactor
Patch introduces a generic printing settings window that is customized by pcbnew and gerbview.
2018-10-31 19:17:30 +01:00
Maciej Suminski e81c3a59a2 Refactored and unified board editor and footprint editor print dialogs 2018-10-31 19:17:30 +01:00
Maciej Suminski 562b8d7948 Printing code clean-up 2018-10-31 19:17:30 +01:00
Maciej Suminski 92c5cb288e Fixed scale in Gerbview printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 8cb464b725 Handle drill mark options in pcbnew printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 3e5ee254cf Fix for 'fit to page' scaled printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 347e21daaa Handle printout settings: line width, color/mono, mirror 2018-10-31 19:17:30 +01:00
Maciej Suminski 47d0eaa2c6 GAL: changed line width setting to float type 2018-10-31 19:17:30 +01:00
Maciej Suminski 1cce194c8a Handle layer settings in printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 5b94f20e6f Adapted printout controllers to the new printing routines 2018-10-31 19:17:30 +01:00
Maciej Suminski 6c689305a6 Decouple GAL printing interface and its Cairo-based implementation 2018-10-31 19:17:30 +01:00
Maciej Suminski e36f6b476d Changed the CAIRO_GAL class hierarchy
There is a dedicated class for display (CAIRO_GAL) and another one
for printing. The common part has been moved to CAIRO_GAL_BASE.
2018-10-31 19:17:30 +01:00
Maciej Suminski 5a64343fb4 CAIRO_PRINT_CTX class
CAIRO_PRINT_CTX provides a Cairo context created from wxPrintDC.
It allows one to prepare printouts using the Cairo library and
let wxWidgets handle the rest.
2018-10-31 19:17:29 +01:00
Maciej Suminski f948e46330 VIEW: changed wxASSERTs to wxCHECKs 2018-10-31 19:17:29 +01:00
Maciej Suminski 17205b4599 Added VIEW::DataReference() for sharing data with another VIEW instance 2018-10-31 19:17:29 +01:00
Maciej Suminski 1411e1f73a GAL: added methods to modify rotation in the transformation matrix 2018-10-31 19:17:29 +01:00
Jeff Young de971df4c6 Don't put up error dialogs after a Cancel of a dialog.
Fixes: lp:1800711
* https://bugs.launchpad.net/kicad/+bug/1800711
2018-10-30 23:13:32 +00:00
Jeff Young f660ec7cf8 Eval when needed, but only replace text when killing focus.
Fixes: lp:1800718
* https://bugs.launchpad.net/kicad/+bug/1800718

Fixes: lp:1800476
* https://bugs.launchpad.net/kicad/+bug/1800476
2018-10-30 22:58:22 +00:00
jean-pierre charras 4b44cbe695 Kicad, Windows specific: disable a overzealous wxWidgets assert when reading a file.
When reading (and writing) a file, we must switch the current locale to "C" for LC_NUMERIC.
Unfortunately, on Windows, a wxWidgets assert was shown when reading some items (bitmaps images).
This wxWidgets assert (related to decimal separator) is overzealous and is now hidden only when reading/writing files.
2018-10-27 19:59:18 +02:00
jean-pierre charras 3dddca767e fix a minor wxWidgets alert. 2018-10-27 13:40:52 +02:00
Jeff Young 16925cc74e Implement RAII locking for GAL updating.
Fixes a crash when typing fast in the place footprint filter box.

Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
2018-10-26 23:02:05 +01:00
Thomas Pointhuber 0e0b4d52a2 Add initial support for Phoenix (new wxPython binding)
Based on the work of @mmccoo:
https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/
and this additional patchset to remove wxpy_api.h dependency:
http://mmccoo.com/random/0001-Remove-dependence-on-pywx_api.h.patch

Please note CreatePythonShellWindow changed quite a lot. Throughful testing
should be made for the old as well as new wxPython version on all platforms
2018-10-26 13:21:11 +02:00
Wayne Stambaugh 2a170c9847 Update license to AGPL due to TTL license.
The decision to include the TTL library make KiCad a derivative work
under the terms of the AGPL version 3 or later license.

Add both the GPL3 and AGPL3 license text files and add a readme file
about the KiCad licensing.  Contributing to KiCad still falls under
the GPL3+ license.

Fixes lp:1797095

https://bugs.launchpad.net/kicad/+bug/1797095
2018-10-22 12:28:48 -04:00
Maciej Suminski f1b2855e80 Fix ENV_VAR_NAME_VALIDATOR typing characters backwards
Fixes: lp:1798869
* https://bugs.launchpad.net/kicad/+bug/1798869
2018-10-22 15:07:44 +02:00
Seth Hillbrand 44d416cafc Move cursor in increments off grid
When the cursor starts off grid, we avoid snapping to the nearest grid
point to prevent movement in an unintended direction.
2018-10-21 14:28:33 -07:00
jean-pierre charras f183b4f526 GAL, Opengl: Draw Arc: fix draw layer depth (previously, set to 0.0, which is not always the case) 2018-10-21 19:53:36 +02:00
jean-pierre charras dafeb96765 Page layout bitmap size wrong in modern/GAL canvases.
The image scale set by pl_editor was not taken in account when drawing the page layout.

Fixes: lp:1798685
https://bugs.launchpad.net/kicad/+bug/1798685
2018-10-20 18:24:22 +02:00
jean-pierre charras 7be215249d OPENGL_GAL: avoid crash when esotheric unicode chars are used in netnames/pad names in Debug mode.
It happens when the char is not found in the font used to display netnames/pad names.
When happens, a wxASSERT is raised.
Unfortunately it can crash the application if it is during a paint event or some critical time.
2018-10-20 18:08:36 +02:00
jean-pierre charras 1116acd74b Libedit: Fix broken handling of "common to all bodu style" property of lib draw items.
Fix a minor wxWidgets assert.
2018-10-20 12:38:36 +02:00
Simon Richter abe1ffabda Replace WIN32 preprocessor symbol by the official symbol _WIN32, used almost everywhere 2018-10-20 09:22:24 +02:00
Thomas Pointhuber f316b98f45 Fix conversation of Python 3 str -> wxString
Conversation of a NoneType for example failed before
2018-10-19 09:59:06 +02:00
Thomas Pointhuber 88d04f3bcb Get Action Plugins working with Python 3, fix some unicode string errors 2018-10-19 09:59:06 +02:00
Thomas Pointhuber 8805706ccb Fix incompatibilites between Python 2 and Python 3 2018-10-19 09:59:05 +02:00
Thomas Pointhuber 7548a3b1bf Add KICAD_SCRIPTING_PYTHON3 flag to about dialog and doc 2018-10-19 09:59:05 +02:00
Thomas Pointhuber 284904b72c Rewrite C extensions to also support Python 3 2018-10-19 09:59:05 +02:00
Seth Hillbrand 6d8a759c75 UTF8: Fix MSVC builds
MSVC does not support variable length arrays.  Substitute a std::vector
instead.
2018-10-18 11:35:45 -07:00
Jeff Young ff992f4a64 Keep track of which nets are currently in use.
Fixes: lp:1798006
* https://bugs.launchpad.net/kicad/+bug/1798006
2018-10-18 12:14:23 +01:00
Seth Hillbrand 441cac9f1b UTF8: Correct MSW issue with previous commit
Linux does not handle the resize command with wide-character extended
table UTF-8.  The solution did not work for W7-32bit.  This is a
compromise, attempting first the preferred, previous solution and
falling back to the secondary solution.

(cherry picked from commit 6106210c87)
2018-10-17 12:40:28 -07:00
Wayne Stambaugh f584b30c73 Replace log debugging output with tracing.
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.

Add new trace flags for locale and screen object tracing.

The usual smattering of code policy fixes.
2018-10-17 15:03:33 -04:00
Jeff Young c22a247dbc Fix undo issue primarily with libedit.
Fixes: lp:1797900
* https://bugs.launchpad.net/kicad/+bug/1797900
2018-10-17 13:10:36 +01:00
Jeff Young e9a80a5d7f Some minor dialog layout fixups. 2018-10-17 11:23:02 +01:00
Seth Hillbrand 594c1bded1 UTF8: Utilize the safe conversion from wchar
Invalid wchar characters would throw an exception.  We need a defined
output from the += operator, even for unknown character.

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

(cherry picked from commit b37bc69476)
2018-10-16 16:37:48 -07:00
jean-pierre charras 61f2dd21b1 Eeschema gal: fix some redraw issues for bitmap images and worksheet.
After edition, the worksheet was not updated on screen.
Bitmap images were not shown in opengl mode due to the fact all gal layers were cached.
2018-10-16 14:20:09 +02:00
Seth Hillbrand bf164f7c4b GAL: Lock context when triggering resize
This action adjusts the compositor, so it must have exclusive access to
the context.
2018-10-15 09:55:53 -07:00
Tomasz Włostowski d66e0d4f7a eeschema-gal: implemented EnableDepthTest() in GAL, fixed drawing order in eeschema 2018-10-15 00:09:59 +02:00
Jeff Young 0bd0558833 Auto-select reference numbers in PcbNew like we do in Eeschema. 2018-10-14 00:06:41 +01:00
Jeff Young 6a5744adb1 Show compile errors and go back to GLSL V120. 2018-10-13 12:39:53 +01:00
jean-pierre charras 7df4ddc74d Use our DIALOG_COLOR_PICKER in 3D viewer to set a color.
the wxWidgets color picker is not the best for the 3D viewer that does not use transparency color.
2018-10-13 08:23:14 +02:00
Seth Hillbrand cfaf7c1f23 pcbnew: re-organizing connectivity
The connectivity files were unwieldy.  This separates them logically
into data, algo and items where the items classes are those that hold,
surprise, surprise, the items, lists and clusters.
2018-10-12 16:31:09 -07:00
Seth Hillbrand 4460313104 pcbnew: Separating connectivity to subdir 2018-10-12 16:31:09 -07:00
Jeff Young 6c34fdefd7 Better exception handling and context locking for GAL.
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.

It also removes an earlier hack to try and minimize this which
didn't work anyway.
2018-10-12 23:44:49 +01:00
Tomasz Włostowski a676034e36 OPENGL_GAL::DrawGrid(): flush drawing buffer after drawing small crosses grid so that it's correctly composited
Fixes: lp:1797642
* https://bugs.launchpad.net/kicad/+bug/1797642
2018-10-12 23:52:35 +02:00
Tomasz Włostowski 22300e4f02 Null pointer check in FOOTPRINT_LIST::GetInstance() 2018-10-12 23:51:31 +02:00
Tomasz Włostowski 7f132ca261 EDA_DRAW_FRAME: avoid cursor flickering in GAL when changing cursor size
Fixes: lp:1797437
2018-10-12 23:20:28 +02:00
Tomasz Włostowski 711b278248 gal/opengl: handle single-pixel line width clamping in hardware (new shader). Correct grid rendering in GAL for pixel-sized lines 2018-10-12 19:13:54 +02:00
Seth Hillbrand 4f672f0d39 Fixing a number of dynamic_casts
Dynamic casts should only be used when we explicitly check for the
resulting pointer to be NULL.  Where we know the class is castable we
can use static_cast, save on overhead and ensure our resulting pointer
is non-null.
2018-10-11 15:24:12 -07:00
Seth Hillbrand a16e21665a view_layers: Initialize variables
Fixes a couple spots where uninitialized variables cause unknown results.
2018-10-11 14:08:35 -07:00
Jeff Young a69635f539 Adjustment to net selector list sizing for GTK.
Thanks to John Beard.
2018-10-11 18:53:00 +01:00
Jeff Young 9f7bc6a9f9 A bit of a hack to keep OpenGL from puking. 2018-10-11 18:53:00 +01:00
Jeff Young 94cc1efbcc Clear filter when poping up net selector.
Even when useful it's unexpected, and GTK has issues with focus
and selection inside the control, making it hard to clear.
2018-10-11 11:58:39 +01:00
Jeff Young ff85798918 Increase list-item padding for GTK net selector. 2018-10-11 11:58:39 +01:00
jean-pierre charras 0dfd0c5f52 Minot cosmetic enhancement 2018-10-11 11:26:59 +02:00
Ronnie Gaensli ab1f016132 Fix assert freeze of eeschema when ToHSV, h is Nan
Fixes: lp:1797006
* https://bugs.launchpad.net/kicad/+bug/1797006
2018-10-10 21:22:26 +02:00
Jeff Young a0b8755f47 Filter <space> out of net filter box. 2018-10-10 19:49:06 +01:00
Jeff Young 01843290fc Exclude space from net filter. 2018-10-10 19:49:06 +01:00
Jeff Young 609d497870 Remember settings in Global Track & Via Properties dialog. 2018-10-10 19:49:06 +01:00
Jeff Young 14721829d7 Hook up keyboard events to parent combobox of net selector. 2018-10-10 14:02:25 +01:00
Jeff Young 779ef044b7 Fix wxGrid column dragging bugs.
Close an open editor when dragging (as wxWidgets won't move it).

Make sure native column headers aren't in use where we need dragging:
their interaction with wxWidgets' dragging is buggy.

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

Fixes: lp:1796396
* https://bugs.launchpad.net/kicad/+bug/1796396
2018-10-09 21:33:43 +01:00
jean-pierre charras 37c2743fec Fix a minor compil warning. 2018-10-09 17:03:43 +02:00
Jeff Young bc69330fe0 Make sure filter text goes at the end.
Some platforms select-all on focus, meaning each character would
replace the pre-existing string.
2018-10-09 14:56:29 +01:00
Seth Hillbrand 81483a9670 ARC_ASSIST: Fix return type in bool check
The return for special angle check is boolean.
2018-10-09 05:37:48 -07:00
John Beard c75d4b9ba1 Fix -Wreorder warning in common view-overlay.cpp
Simple fix - m_radius comes after m_{start,end}Angle in the class member list.
2018-10-09 11:08:56 +01:00
Jeff Young 9dfcc839a4 Fix color issues with cursor and sheet pins. 2018-10-09 11:08:56 +01:00
jean-pierre charras 4a92a5e628 Fix a Eeschema crash when using a SYMBOL_PREVIEW_WIDGET. Fix also a few draw artifacts. 2018-10-09 11:08:56 +01:00
jean-pierre charras a6d014d959 Fix some artifacts when drawing items, both on Cairo and Opengl.
Fix also incorrect selection of De Morgan style selection in SYMBOL_PREVIEW_WIDGET.
2018-10-09 11:08:56 +01:00
Jeff Young 2d5baac77d Fix up zoom and pan issues entering/leaving sheets. 2018-10-09 11:08:56 +01:00
jean-pierre charras b42f94e27b Eeschema, Cairo backend: fix a minor but annoying render issue. 2018-10-09 11:08:56 +01:00
jean-pierre charras 88cdce8d62 Make SYMBOL_PREVIEW_WIDGET working, and using the canvas type of the caller. Fix an issue with F3 zoom key in libedit. 2018-10-09 11:08:56 +01:00
Jeff Young 6f89b41f18 Cleanup. 2018-10-09 11:08:56 +01:00
jean-pierre charras 33386ec980 Fix zoom issues in Eeschema (F1 to F4 and popup zoom commands) Fix also not saving the Gal Canvas type on eeschema exit. 2018-10-09 11:08:56 +01:00
jean-pierre charras f283667fb0 add option to switch between opengl and cairo in eeschema (step 1) 2018-10-09 11:08:56 +01:00
jean-pierre charras 58916a200e Eeschema: Fix a crash at start in Debug mode 2018-10-09 11:08:56 +01:00
Jeff Young e2ea9b772a Fix offset issue when moving text. 2018-10-09 11:08:56 +01:00
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