Commit Graph

3819 Commits

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