Commit Graph

3616 Commits

Author SHA1 Message Date
Jon Evans 081c77f6bd OPENGL_GAL::DrawSegment(): Enforce nonzero width to match Cairo
Fixes: lp:1759958
* https://bugs.launchpad.net/kicad/+bug/1759958
2018-03-29 22:13:46 -04:00
Jon Evans ed99251f0b Add explicit file:// URI scheme for html help files
This fixes the help location on MacOS
2018-03-28 17:18:15 -04:00
jean-pierre charras 6740a37632 move and swap layers: make changes undoable.
minor code cleanup.
2018-03-28 15:30:11 +02:00
Seth Hillbrand 545e6bbd0c Defining time_t for Python
Fixes: lp:1732738
* https://bugs.launchpad.net/kicad/+bug/1732738
2018-03-27 09:43:23 -07:00
Seth Hillbrand ced0fcee1e Updating Eagle Importer to take curved zones
Fixes: lp:1755879
* https://bugs.launchpad.net/kicad/+bug/1755879
2018-03-26 15:09:56 -07:00
Jeff Young 8b94606fb5 Promote selection up context menu hierarchy.
This is so that tools checking for a selected item won't think
the menu has been cancelled if the selection was in a submenu.

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

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

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

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

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

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

Fixes: lp:1753143
* https://bugs.launchpad.net/kicad/+bug/1753143
2018-03-04 01:16:59 +00:00
Tomasz Włostowski af7064ef89 pcbnew: synchronize zone visibility view menu entries with the toolbar buttons 2018-03-03 17:38:28 +01:00
Seth Hillbrand e6245c5c5a Fix type comparison warning 2018-03-02 17:08:01 -08:00
Maciej Suminski 3f1a3fe65b Derive DIALOG_MULTI_OPTIONS from wxMultiChoiceDialog 2018-03-02 18:09:27 +01:00
Maciej Suminski be13bb0013 Refactored SelectSingleOption() to take advantage of wxSingleChoiceDialog. 2018-03-02 17:43:59 +01:00
Maciej Suminski 18167f829a Derive KIDIALOG from wxRichMessageDialog
wxRichMessageDialog already offers a dialog with a checkbox, so
the custom dialog setup code is not necessary anymore.
2018-03-02 17:05:35 +01:00
Maciej Suminski 1d5df8e975 Renamed KI_DIALOG to KIDIALOG 2018-03-02 11:57:03 +01:00
Maciej Suminski 52fcddf4f4 Allow drawing self-intersecting polygons, just display a warning
Fixes: lp:1751654
* https://bugs.launchpad.net/kicad/+bug/1751654
2018-03-02 10:58:43 +01:00
Jon Evans 37beb726e3 GerbView: Implement in-place GAL layer reordering (for X2 sorting) 2018-02-27 20:59:07 +01:00
jean-pierre charras 5f578c884c Fix SetValue() method in TEXT_CTRL_EVAL
Normal SetValue() call would temporarily change the displayed
value, but as soon as the text widget receives focus again, the original
expression (not evaluated) is restored.

To avoid this, the original expression is cleared in the associated
NumericEvaluator object.
2018-02-27 12:47:43 +01:00
Maciej Suminski 5f2b8e0409 Change NumericEvaluator::clear() to optionally accept an object to clear 2018-02-27 12:47:32 +01:00
Maciej Suminski ad6571a508 GAL profiling: changed wxLogDebug() to wxLogTrace() for DRAW_PANEL_GAL 2018-02-26 17:22:47 +01:00
Maciej Suminski b9285cf0e5 Display theta character correctly in ruler tool
Fixes: lp:1749549
* https://bugs.launchpad.net/kicad/+bug/1749549
2018-02-26 10:38:40 +01:00
Jon Evans e21f18a176 Don't use the RTREE in UpdateAllLayersOrder() / UpdateAllLayersColor()
Since we are going to inspect every item for these calls, we don't
need to use the RTREE search, which is expensive with high item count.

This results in ~50% improvement in layer switching time in GerbView
when working with a set of large Gerber files.
2018-02-25 19:10:02 -05:00
Jon Evans 4ec7a02ccd Add a method to conditionally update VIEW_ITEMs (GerbView performance) 2018-02-25 18:20:44 -05:00
Jon Evans d7bb83ddcb Add a REPAINT flag for faster redraw when bounding box hasn't changed 2018-02-25 18:20:34 -05:00
Jon Evans be8bb24390 Make all new hotkeys editable; label some GAL-only hotkeys
Fixes: lp:1751183
* https://bugs.launchpad.net/kicad/+bug/1751183
2018-02-25 17:57:36 -05:00
Jon Evans b90528a7ae Fix regression in GerbView display settings; some optimization too 2018-02-25 17:35:26 -05:00
Carsten Schoenert 9679bd55c1 fix misspelled 'streching' -> stretching 2018-02-25 17:10:10 -05:00
Carsten Schoenert cb14742442 fix misspelled 'accesing' -> 'accessing' 2018-02-25 17:10:10 -05:00
Michael Geselbracht 21f46776c6 Fix decimal point bug, support for more units V2
If ',' is used as decimal separator by the current locale a '.' is also accepted.
Also add support for units "mi", "th" and "in" as described in the documentation of pcbnew.

Fixes: lp:1751315
* https://bugs.launchpad.net/kicad/+bug/1751315
2018-02-25 08:21:23 +01:00
Jeff Young 7bd2f14342 Go back to checking individual file timestamps.
Too many external applications fail to touch the parent directory.

Also removes FP_CACHE_ITEM lastMod times and dirty flags as we've
always loaded libraries atomically anyway.

Claws back some of the performance lost by being more efficient
with cache management for sequential calls to Enumerate and then
Load.

Fixes: lp:1750936
* https://bugs.launchpad.net/kicad/+bug/1750936
2018-02-23 10:56:12 -05:00
Jeff Young bbad8dc9af Conditionally compile Mac-specific bug fix.
It apparently hangs some other window managers.

Fixes: lp:1748793
* https://bugs.launchpad.net/kicad/+bug/1748793
2018-02-23 10:01:45 -05:00
Simon Richter d5f5f5e719 Remove duplicate source file from list 2018-02-22 18:40:55 -05:00
Jeff Young e552c2fbff Remove confusing active library interactions with save.
Add a library selector to the save dialog.  Initialize it to the
footprint's library.  This way a straigh-up save will do what's
expected.

However, the user can still select the active library (or any
other library) if they really did want to move the footprint.

Fixes: lp:1750918
* https://bugs.launchpad.net/kicad/+bug/1750918
2018-02-22 18:19:02 -05:00
jean-pierre charras 43cb1b7bc7 Fix a compil issue with too old compilers 2018-02-22 21:06:48 +01:00
Jeff Young 4dda8a39fe Add inc/dec current layer alpha to menus.
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
2018-02-22 17:48:14 +01:00
Maciej Suminski 2dfc35a9d6 Fix a typo in KI_DIALOG::Title() 2018-02-22 17:26:35 +01:00
Maciej Suminski 918ac567e5 Fix constant naming conflict in KI_DIALOG 2018-02-22 17:15:22 +01:00
Maciej Suminski 8a8b062d8e Fix a copy-paste error in WX_HTML_REPORT_PANEL badges creator 2018-02-22 17:05:06 +01:00
Maciej Suminski 01aca9d783 KI_DIALOG: flexible way of creating dialogs, including "do not show again" 2018-02-22 16:24:08 +01:00
Maciej Suminski 4da47f2c01 Forbid drawing self-intersecting polygons. 2018-02-22 16:24:08 +01:00
Maciej Suminski 7129dcef91 Added STATUS_TEXT_POPUP for simple popup text display 2018-02-22 15:18:52 +01:00
Maciej Suminski 9673ac4ecd WX_STATUS_POPUP refactor
- Rename WX_STATUS_POPUP -> STATUS_POPUP
- Added Expire() to show a popup temporarily
- Code formatting
2018-02-22 15:18:52 +01:00
Maciej Suminski 7775f59eec Converted zone drawing tools to store points in a SHAPE_LINE_CHAIN
Simplifies the code a bit, removes redundant conversions to/from
std::vector.
2018-02-22 15:18:52 +01:00
Jon Evans 0c9d11c180 Add progress reporting for GerbView file loading 2018-02-21 13:17:02 -05:00
Jeff Young 900bd9da68 Added error and warning badges to HTML report panel.
Fixes: lp:1669020
* https://bugs.launchpad.net/kicad/+bug/1669020
2018-02-20 18:51:58 -05:00
Wayne Stambaugh 961ddd107d Update AUTHORS.txt and contributors list in about dialog. 2018-02-20 15:47:43 -05:00
Jeff Young cd81254262 Respect 45-degree mode when set from zone dialog.
Fixes: lp:1655073
* https://bugs.launchpad.net/kicad/+bug/1655073
2018-02-20 17:38:20 +01:00
Jeff Young 4d5e1489fb New menu structure for ModEdit.
Includes some dialog changes to go with the menu update.
Includes promoting the Pcbnew graphics mode back to main menu.
Includes renaming Graphics modes to Toolsets.
2018-02-20 10:49:41 -05:00
Jon Evans 01ab8b0584 Use polygonal hit testing for module selection 2018-02-20 10:43:43 -05:00
Jeff Young 5c6b19c55d Don't allow DIALOG_SHIM to reduce size below min.
This should fix a bunch of bugs with run-time generated sizes
that can grow larger than their minimums in other configurations.

Also fixes a related bug in the WX_HTML_REPORT_PANEL where the
min size was set in the wrong place.

Fixes: lp:1692442
* https://bugs.launchpad.net/kicad/+bug/1692442
2018-02-19 10:53:02 -05:00
Maciej Suminski 2f4ec0c0c4 Code formatting 2018-02-19 10:18:01 +01:00
Maciej Suminski 463e944113 Fixed an assert when assigning a bitmap to radio menu item 2018-02-19 08:44:09 +01:00
Jeff Young 8b4e8fcd26 Dialog changes to go with new menu structure.
Move sketch mode stuff from Display Settings to View menu.
Move Icons in Menus from View menu to General Preferences.
Move Icon Scaling from Display Settings to General Preferences.
Regroup some items in both dialogs for better comprehension.
2018-02-18 17:03:26 -05:00
Jeff Young b3884669cf Proper error reporting for Annotate dialog.
Also fixes:
- forcing the annotation scope to "full schematic" when run
  as a prerequisite to Generate Netlist.

- a long-standing bug where displaying extra items in a dialog
  would mess up the height of the HTML_REPORT_PANEL (becasue
  we were setting the html window's height rather than its
  parent flexgrid.

- initializing the annotation radio buttons to safe values
  (full schematic and keep existing)

Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
2018-02-18 15:08:24 -05:00
Tomasz Włostowski 5fef750b49 SHAPE_ARC: use more Kicad-ish arc representation. Fixes board outline collisions issues in the P&S 2018-02-17 18:25:20 +01:00
Maciej Suminski 24fcdb00cc Eagle importer: convert special characters in net names
Convert '!' to '~' to reflect overbar toggling and change '~' to '~~'.
Now it matches the net names in schematics import plugin.
2018-02-17 00:03:28 +01:00
Maciej Suminski c95340fbaf Eagle importer: replace invalid character with '_' to match PCB<->SCH 2018-02-16 16:52:14 +01:00
Maciej Suminski 81b3c420fd Set OK as the default button in Select{Single,Multi}Option() dialogs 2018-02-16 11:28:37 +01:00
Jeff Young 908697c9c8 Turn place footprint's browser back on for Mac.
Fixes: lp:1749436
* https://bugs.launchpad.net/kicad/+bug/1749436
2018-02-15 14:45:01 -05:00
Maciej Suminski 461b6aff5e Do not set bitmaps for wxITEM_RADIO menu items on Linux and macOS 2018-02-15 16:40:29 +01:00
Michael Geselbracht 5d738dcb6d Coverity fix for libeval (CID #169327) 2018-02-15 15:43:12 +01:00
Jeff Young 809093acd0 Don't bail out of loading when one library couldn't be found.
Also includes some cleanup to the error dialog (removing
sunken border, fixing OK button, etc.)

Fixes: lp:1749572
* https://bugs.launchpad.net/kicad/+bug/1749572
2018-02-15 10:53:03 +01:00
Maciej Suminski 570f4dd991 Coverity fixes
CIDs:
174166
174170
174171
2018-02-15 10:27:01 +01:00
jean-pierre charras 4012aa70da Fix a few minor Coverity warnings 2018-02-15 10:16:17 +01:00
Maciej Suminski 151021919e Tool Manager: yet another approach to handling tool view control settings
All calls to {save,apply}ViewControls() have been replaced with a new
method: setActiveState(). The advantage is that setActiveState() always
saves view controls settings to the tool that set them. As long
as setActiveState() is called every time there is a tool context
switch, the changes are kept up-to-date.

Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
2018-02-14 15:34:05 +01:00
Maciej Suminski 21a2c8d562 Fix cursor control with arrow keys
Fixes: lp:1749328
* https://bugs.launchpad.net/kicad/+bug/1749328
2018-02-14 09:23:44 +01:00
Maciej Suminski 5c8accef8e Enable GL debug output only if available 2018-02-14 08:52:08 +01:00
Jeff Young f68bf33cd3 Implement progress reporter for cvpcb footprint loading.
Fixes: lp:1676910
* https://bugs.launchpad.net/kicad/+bug/1676910
2018-02-13 20:21:38 -05:00
Jeff Young 4bae901dc8 Centralize zoom-to-fit code.
Fixes a bunch of errors:
- libedit and libbrowser would zoom to bounding box but centre on canvas
- libedit, libbrowser and gerbview didn’t take the scroll bars into account
- pcbnew didn’t take scroll bars into account or apply the 10% margin
- appending a board file would re-centre, but not re-zoom

Fixes: lp:1504302
* https://bugs.launchpad.net/kicad/+bug/1504302
2018-02-13 20:06:03 -05:00
Maciej Suminski ac9fc949bd Code formatting for 013f7b4d 2018-02-13 14:56:11 +01:00
Russell Oliver 34b52c91b7 Add empty eeschema page layout for Eagle schematic import.
Fixes: lp:1729722
* https://bugs.launchpad.net/kicad/+bug/1729722
2018-02-13 14:56:11 +01:00
Maciej Suminski 365ab99a6a GAL: update cursor position on panning and scrolling
Fixes: lp:1749082
* https://bugs.launchpad.net/kicad/+bug/1749082
2018-02-13 09:45:06 +01:00
Maciej Suminski d3998a2d08 Do not override cursor position when context menu is active
It affected just started tools that did not have cursor settings
stored, so could not be reverted after the context menu is gone.

Fixes: lp:1748613
* https://bugs.launchpad.net/kicad/+bug/1748613
2018-02-12 11:21:07 +01:00
Jeff Young ed127e866a Fix bone-headed mistake in selection highlighting patch.
(__UNIX__ *is* defined for Mac/OSX)
2018-02-12 08:41:37 +01:00
jean-pierre charras 62ef63501c Cvpcb: remove fixed size and use the last stored size.
It fixes a bug created by commit b1eed74b55.
Other very minor fix in Cvpcb
2018-02-11 20:14:48 +01:00
Jeff Young 916f79d5a1 Performance fixes for the place footprint list all dialog.
Smartens the cache freshness checking, and adds checksums of
constituent-directory last-mod-dates to the footprint info
list.

Also inserts the dataPtrs into the list at the same time as
the text to keep wxWidgets from measuring the width of the
text twice (yes, really).  And converts the list to default-
column widths in case the wxWidgets patch is present to
greatly speed list creation (by not measuring all that text).

On my machine drops the first-load time from 4s to 2.5s and
the subsequent-load times from 2.5s to < 1s.  With the
wxWidgets patch subsequent-loads become near-instantaneous.
2018-02-11 11:51:48 -05:00
Jeff Young a7cdd94212 PCBnew clarify selection menu doesn't highlight individual selection on Windows
(Use Mac solution to disambiguation highlighting on MSW).

Fixes: lp:1594029
https://bugs.launchpad.net/kicad/+bug/1594029
2018-02-11 13:29:45 +01:00
Jeff Young 0bbf961881 Clean up Cancel vs Close buttons in dialogs.
Many had already been fixed but weren't working on Mac because
of the DIALOG_SHIM hack (now fixed).  Others hadn't been updated
yet.  Also includes some cleanup for elipses in buttons and
layout.

Fixes: lp:1748506
* https://bugs.launchpad.net/kicad/+bug/1748506
2018-02-10 17:53:12 -05:00
Jeff Young 1afbfad44a Use "..." uniformly in menus.
See the bug report for some wording changes and a couple of
menu restructurings that were also cleaned up.

Fixes: lp:1597827
* https://bugs.launchpad.net/kicad/+bug/1597827
2018-02-10 17:32:28 -05:00
jean-pierre charras 5ecfd32654 OpenGl fix: call enableGlDebug( true ) only in Kicad debug build, and only on Linux
(Because we have crashes on OSX and some Window installs)
2018-02-10 11:57:22 +01:00
Maciej Suminski 8a68a21570 Enable OpenGL debug output in debug builds 2018-02-09 16:20:38 +01:00
Maciej Suminski c39fd46c07 PROGRESS_REPORTER: code formatting 2018-02-09 14:20:25 +01:00
Jon Evans 9452c61462 Use vector instead of bitset for VIEW_ITEM_DATA layer storage
Shows 10-15% speed improvement in rendering large files in MacOS
2018-02-08 11:54:18 +01:00
Maciej Suminski 835fc22892 wxWidgets/GTK3 compatibility fixes for eeschema
- Keep refreshing the screen as the cursor is moved.
- Invert the cursor color as it is not drawn using XOR mode anymore.
2018-02-08 11:08:17 +01:00
Maciej Suminski f0adf81a99 Do not draw circles of 0 radius
Apparently calling wxDC::DrawEllipse() with parameters resulting in a
circle with radius equal to 0 lead to printing problems.

Fixes: lp:1746210
* https://bugs.launchpad.net/kicad/+bug/1746210
2018-02-06 17:28:56 +01:00
Tomasz Włostowski 271363f822 router: support for board outline 2018-02-06 09:43:56 +01:00
Tomasz Włostowski 2faf1a1ed3 Initial support for keepout zones in the P&S router. 2018-02-06 09:43:56 +01:00
jean-pierre charras 1858852f57 rename files 2018-02-02 21:57:12 +01:00
Maciej Suminski 95864780e2 Fix cursor freezes in GAL
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.

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

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

Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
2018-02-02 19:08:05 +01:00
jean-pierre charras d00fafe2ab GAL mode: Ensure a minimal zoom level change on mouse wheel, especially when canvas redraw takes a long time (more than 100ms)
Previously, the zoom level change could be very small ( <= 1.05, that is a very small zoom level change), especially for large boards.
2018-02-02 13:19:59 +01:00
Maciej Suminski 0e9dedf3cd Fixed a memleak in About dialog. Updated the copyright year. 2018-01-31 10:05:00 +01:00
jean-pierre charras 39b4afecfa fix code after file renaming 2018-01-31 09:24:02 +01:00
jean-pierre charras 32aedc99b7 rename files 2018-01-31 09:24:00 +01:00
jean-pierre charras 6d6ef0097b Fix code after renaming files. Minor other fix. 2018-01-30 20:23:35 +01:00
jean-pierre charras b43dc7954c fix code after renaming files 2018-01-30 15:34:09 +01:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras bc76ec4d67 Rename files according to the name of classes they are defining 2018-01-29 16:40:20 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 398f6d7b32 rename a few files 2018-01-29 09:50:58 +01:00
jean-pierre charras d44494beda Update code after file renaming 2018-01-29 09:39:49 +01:00
jean-pierre charras fa10e1b7fe rename a few files 2018-01-29 09:39:47 +01:00
jean-pierre charras 1bc3dfef10 fix compil issue in kicad.i and a minor compil warning 2018-01-28 22:24:51 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
jean-pierre charras 5868202c28 rename files, mainly files for plotter control 2018-01-28 18:13:27 +01:00
jean-pierre charras 93fd0c9358 move plotter related files to subdir plotters 2018-01-28 17:49:55 +01:00
Jeff Young 899afa1e90 Reinstate OSX cursor shape selection
Mark it as not supported in Legacy graphics.

Fixes: lp:1745097
* https://bugs.launchpad.net/kicad/+bug/1745097
2018-01-28 10:47:20 -05:00
Jeff Young 3ad3869ae8 Make sure OSX modal event loops end.
WindowModal works fine, but nested AppModals never get the inner
eventloop cancelled.

Fixes: lp:1718079
* https://bugs.launchpad.net/kicad/+bug/1718079
2018-01-28 15:16:07 +01:00
jean-pierre charras ce02798533 Fix a minor compil warning. 2018-01-28 14:13:16 +01:00
Wayne Stambaugh f4273b9e41 Fix coding policy fixes from previous commit along with a few others. 2018-01-27 20:34:14 -05:00
Martin Sivak d5cdd78062 eeschema: keystroke zoom should obey disabled centering
Keystroke zoom (F1/F2) always centered the screen, because it
was handled as ID_POPUP_ZOOM_IN event. Mousewheel scrolling
was ok, because it is handled using different event based
on the configuration.

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

The same issue is fixed for legacy canvas pcbnew.

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

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

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

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

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

Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:40:51 -05:00
jean-pierre charras 17739859b3 DXF plot: fix incorrect plotting of oval holes
Due to missing DXF_PLOTTER::ThickSegment code to plot a thick segment in SKETCH mode (outline mode)
2018-01-27 17:33:39 +01:00
Jon Evans b547c5cdf0 Reapplied: Save view control settings before dispatching new tool events
Unintentionally removed in b8ecc95d.
2018-01-26 19:23:08 +01:00
Maciej Suminski b8ecc95d9c Forward context menu events to the tool that created the menu
It fixes the case when a tool sets up a menu and starts its event loop
waiting exclusively for menu events. If none arrived, the tool was stuck
in the loop forever.

Fixes: lp:1744915
* https://bugs.launchpad.net/kicad/+bug/1744915
2018-01-26 15:53:52 +01:00
Jeff Young 89a5a84af9 Remove refereces to OpenGL and Cairo from Display Settings
Fixes: lp:1745131
* https://bugs.launchpad.net/kicad/+bug/1745131
2018-01-25 12:11:17 +01:00
Wayne Stambaugh c95c77c51a KiCad: fix assertion when adding new path configuration entry.
The fix for this is a crude hack.  The assertion is caused by the fact
that KICAD_MANAGER_FRAME is not a KIWAY_PLAYER.  The only way to fix
this correctly is to derive KICAD_MANAGER_FRAME from KIWAY_PLAYER so
the window ordering can be corrected and the dialog can be called using
ShowQuasiModal().

Fixes lp:1744228

https://bugs.launchpad.net/kicad/+bug/1744228
2018-01-23 14:48:56 -05:00
Maciej Suminski 121e670508 TEXT_CTRL_EVAL: Close the parent dialog after pressing Enter
Fixes: lp:1744721
* https://bugs.launchpad.net/kicad/+bug/1744721
2018-01-23 11:49:39 +01:00
Maciej Suminski da305e7750 Move SwitchCanvas() implementation to EDA_DRAW_FRAME
Share more code between pcbnew and gerbview. Fix warnings regarding
shadowing EDA_DRAW_FRAME::SwitchCanvas().
2018-01-22 09:06:55 +01:00
jean-pierre charras 81642dddd1 Track polygon clearance: use the new TransformOvalClearanceToPolygon function, to avoid underestimation of clearance areas.
(issue already found for oval pads)
Add some comments.
2018-01-21 11:32:37 +01:00
jean-pierre charras 2fd00b1d23 Revert "Ensure DrawRectangle() stroke outline will always be visible"
This reverts commit 74d47d8173 because
it breaks DrawRectangle in outline mode because it modify line width.
2018-01-21 10:14:02 +01:00
jean-pierre charras 6dd398bd6f Better calculation of polygon clearance area of oval pads.
Fixes: lp:1665582
https://bugs.launchpad.net/kicad/+bug/1665582
2018-01-20 20:44:04 +01:00
jean-pierre charras 1db14d44b7 Better calculation of polygon clearance area of oval pads. Wip. 2018-01-20 19:34:50 +01:00
Jeff Young cba430deab Fix undo/redo and revert for libedit name changes and aliases
Three interrelated issues:
1) Implement an undo/redo type for renames so that we know to delete
the old lib entry and add a new lib entry
2) When doing so (for the undo/redo OR the original edit), we must
make a copy of the 'original' LIB_PART which is used for revert, and
hand it to the new lib entry
3) When comparing a modified component tree item with the current item
we must also check for aliases.

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

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

Fixes: lp:1744373
* https://bugs.launchpad.net/kicad/+bug/1744373
2018-01-20 11:20:22 +01:00
jean-pierre charras b4ea875c5e Add comments. 2018-01-20 10:07:12 +01:00
jean-pierre charras 673f03e595 Convert circle to polygon: minimize rounding errors.
Fixes: lp:1735206
https://bugs.launchpad.net/kicad/+bug/1735206
2018-01-19 21:10:40 +01:00
jean-pierre charras 2e83103c3d WIDGET_NET_SELECTOR: speedup the net list creation.
Add comments and better names for variables.
2018-01-19 11:01:42 +01:00
Jeff Young 959767c09f Don't warp mouse when context menu was cancelled.
Fixes: lp:1674199
* https://bugs.launchpad.net/kicad/+bug/1674199
2018-01-18 13:43:24 -05:00
Maciej Suminski d87a7ae58e Fallback to Cairo when OpenGL is not supported
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
Jon Evans b21f301097 Defer canvas type setting save until destruction of EDA_DRAW_FRAME
Fixes: lp:1741787
* https://bugs.launchpad.net/kicad/+bug/1741787
2018-01-18 10:17:06 +01:00
jean-pierre charras 47d392d83e Fix incorrect name (typo) of a method. 2018-01-18 10:11:45 +01:00
Jeff Young e1c01e1e7f Render transparent layer colors over the correct background.
This fixes the layer comboboxes, the copper zones properties
dialog, and the differental-pair icon in the htoolbar.

Fixes: lp:1741049
* https://bugs.launchpad.net/kicad/+bug/1741049
2018-01-17 11:36:37 -05:00
jean-pierre charras 6014307d06 Pcbnew, DRC dialog: Fix a few issues:
Gal mode: graphic cross-air cursor moved on items when clicking on & DRC error, like in legacy mode.
Make popup menu shown when right clicking on a DRC error item working.
2018-01-17 15:36:04 +01:00
Maciej Suminski d85cf732b6 TEXT_CTRL_EVAL: Evaluate expressions when Enter key is pressed
Fixes: lp:1741320
* https://bugs.launchpad.net/kicad/+bug/1741320
2018-01-16 14:53:13 +01:00
Maciej Suminski 495c4125f9 Set line width for SELECTION_AREA
Fixes: lp:1743242
* https://bugs.launchpad.net/kicad/+bug/1743242
2018-01-16 09:27:56 +01:00
Jon Evans 74d47d8173 Ensure DrawRectangle() stroke outline will always be visible
Fixes: lp:1743242
* https://bugs.launchpad.net/kicad/+bug/1743242
2018-01-16 09:20:02 +01:00
jean-pierre charras 94c8a947ad Progress reporter: remove wxPD_APP_MODAL style, not useful, that creates issues on OSX.
All platforms now use the same code.
2018-01-15 17:57:03 +01:00
Jon Evans 11fa7cdaf3 Save view control settings before dispatching new tool events
Fixes: lp:1741357
* https://bugs.launchpad.net/kicad/+bug/1741357
2018-01-15 10:46:09 +01:00
Jon Evans 6eb5733a0b LSET::UIOrder and LSET::Technicals now match layer widget order
Fixes: lp:1673792
* https://bugs.launchpad.net/kicad/+bug/1673792
2018-01-15 10:08:30 +01:00
Seth Hillbrand cc836903bd Disable live resizing for wxAUI as it glitchy
Fixes: lp:1695897
* https://bugs.launchpad.net/kicad/+bug/1695897
2018-01-13 17:28:28 -05:00
Jeff Young 786312b103 wxWidgets and KiCad fixes for quasi-modal dialogs.
OSX activates windows before telling the application, so there's
no good way to implement wxWidgets window enable/disable.  This
patch keeps the quasi-modal dialog and its parent windows order
in the z-list fixed, and re-activates the quasi-modal dialog
whenever the OS activates the parent window.
2018-01-12 12:06:00 -05:00
Jon Evans 5fd1236d7a Use worksheet bounding box when the board is empty
Fixes: lp:1742140
* https://bugs.launchpad.net/kicad/+bug/1742140
2018-01-11 11:28:19 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01:00
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00
Maciej Suminski ea9b568743 Formatting fixes for the previous commit 2018-01-08 12:52:17 +01:00
Dan Weatherill efed38ad3e Fix hotkey import persistence
Fixes: lp:1738875

This patch saves hotkeys to default file when a hotkeys file is
imported, so they remain persistent in future sessions.

Also, a few minor tidy ups (e.g. c++11 nullptr) internal to
common/hotkeys_basic.cpp.
2018-01-08 11:43:01 +01:00
Maciej Suminski 4ec24badb9 Enlarge OpenGL glyphs to match Cairo and legacy text size 2018-01-08 10:46:27 +01:00
Kristoffer Ödmark e7ddcca569 Fix some netname rendering issues
Fixes: lp:1739074
* https://bugs.launchpad.net/kicad/+bug/1739074
2018-01-08 10:29:50 +01:00