Commit Graph

3428 Commits

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