Commit Graph

3495 Commits

Author SHA1 Message Date
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