Commit Graph

217 Commits

Author SHA1 Message Date
Jon Evans 37beb726e3 GerbView: Implement in-place GAL layer reordering (for X2 sorting) 2018-02-27 20:59:07 +01:00
Maciej Suminski ad6571a508 GAL profiling: changed wxLogDebug() to wxLogTrace() for DRAW_PANEL_GAL 2018-02-26 17:22:47 +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 b90528a7ae Fix regression in GerbView display settings; some optimization too 2018-02-25 17:35:26 -05: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 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
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
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
jean-pierre charras 47d392d83e Fix incorrect name (typo) of a method. 2018-01-18 10:11:45 +01: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
Jon Evans 53ae5c36f4 Flip horizontal scrollbar behavior in flipped board view mode
Fixes: lp:1741327
* https://bugs.launchpad.net/kicad/+bug/1741327
2018-01-06 14:58:05 -05:00
Julius Schmidt 9df938484a support "disable autopan" with gal canvas
Fixes: lp:1670712
* https://bugs.launchpad.net/kicad/+bug/1670712
2017-11-24 12:20:15 +01:00
Tomasz Włostowski 41f9c19b7d pcbnew: editing outlines now works in flipped view mode
Fixes: lp:1731978
* https://bugs.launchpad.net/kicad/+bug/1731978
2017-11-16 01:05:43 +01:00
Tomasz Włostowski b76a6210c5 pcbnew: fixed stuck cursor when ForceCursorPosition() is active and cursor is moved by keyboard arrows
Fixes: lp:1729301
* https://bugs.launchpad.net/kicad/+bug/1729301
2017-11-16 00:43:23 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Tomasz Włostowski c9817df9db refactoring: implemented BOARD-specific view Add()/Remove()/Update() methods in PCB_VIEW, moved to libpcbcommon 2017-11-03 20:02:06 +01:00
Maciej Suminski 6006b54dd9 Fixed a crash when editing a pad of a bottom layer module
Fixes: lp:1720007
* https://bugs.launchpad.net/kicad/+bug/1720007
2017-09-28 09:58:34 +02:00
Jon Evans 9383987b1c Skip calling RTREE::Remove() when adding items to a VIEW 2017-09-25 13:39:38 +02:00
Jon Evans 0b9b8d3e93 Add support for reversed draw order and Cairo negative draw mode 2017-09-25 13:35:01 +02:00
Maciej Suminski df472e6426 Added mouse position refresh event WX_VIEW_CONTROLS::WarpCursor() 2017-09-22 11:13:45 +02:00
Michael Geselbracht da037027fb Do not warp viewport when dragging FPs
Fixes: lp:1714611
* https://bugs.launchpad.net/kicad/+bug/1714611
2017-09-22 11:13:40 +02:00
Jon Evans d9396616ef Add support for panning with left and right mouse buttons 2017-09-15 13:35:52 +02:00
jean-pierre charras cf178fd20a add a wxASSERT just in case. 2017-09-15 11:29:49 +02:00
Jon Evans 5364cd9681 Improved zoom behavior on MacOS 2017-09-15 11:27:35 +02:00
Jon Evans 49a3e7ec2d Support scrollbar controls in GAL canvas 2017-09-14 07:34:29 +02:00
Maciej Suminski 31ef52a365 Fix fine-grid cursor movement using arrow keys
Fixes: lp:1497976
* https://bugs.launchpad.net/kicad/+bug/1497976
2017-08-22 15:14:33 +02:00
Maciej Suminski b5db6a7d5d Map/unmap vertices once per layer order update
Multiple memory map/unmap operations cause a significant delay on
GPUs that fetch vertices from RAM.

Fixes: lp:1701936
* https://bugs.launchpad.net/kicad/+bug/1701936
2017-08-21 13:28:09 +02:00
Maciej Suminski ef22c2589d Store forced cursor position in VC_SETTINGS 2017-08-07 08:59:32 +02:00
Oliver Walters 161045f17d Speed improvement for select / deselect in GAL
- No longer invalidates the item layers
- For multiple items, this results in a drastic speed improvement
2017-07-25 16:34:03 +02:00
Maciej Suminski 08c4a0bc7b Fixed SELECTION_TOOL::selectCursor()
In the previous version the method did not work correctly
when an action was invoked from context menu. In such case,
the cursor position was obtained in the moment of selecting
the action, instead of using the right click location.
2017-07-12 09:34:20 +02:00
Maciej Suminski dcc803ecb1 VIEW_CONTROLS::GetMousePosition() returns the mouse position in world coordinates. 2017-06-12 16:24:52 +02:00
Maciej Suminski 481fd233d4 Enable cursor snapping by default
Fixes: lp:1671869
* https://bugs.launchpad.net/kicad/+bug/1671869
2017-04-20 15:04:05 +02:00
Maciej Suminski 74847bf8ff Code formatting and clean-up 2017-04-20 14:01:38 +02:00
Maciej Suminski bf590780b8 Do not store 'force cursor position' setting in VIEW_CONTROLS::SETTINGS
Fixes: lp:1678875
* https://bugs.launchpad.net/kicad/+bug/1678875
2017-04-04 00:57:54 +02:00
jean-pierre charras 6eb2000b69 fix Coverity warning (CID 151565) (CID 155147) 2017-04-01 20:05:33 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
John Beard 78a5185857 Allow GAL cursor to be always displayed
A new items is added to the GAL display options (and the dialog), and a
hotkey (Ctrl+Shift+x) is added to toggle it.

Fixes: lp:1673633
* https://bugs.launchpad.net/kicad/+bug/1673633
2017-03-22 10:04:56 +01:00
Tomasz Włostowski f599f10a03 gal: reset autopan state when autopanning is disabled
Fixes: lp:1674022
* https://bugs.launchpad.net/kicad/+bug/1674022
2017-03-20 11:45:57 +01:00
Tomasz Włostowski 3cc90ce2d2 Fixed center-on-zoom behaviour in the GAL canvas
Fixes: lp:1672868
* https://bugs.launchpad.net/kicad/+bug/1672868
2017-03-15 11:48:35 +01:00
Maciej Suminski fc4240886b Store VIEW_CONTROLS settings on a stack
This is the right implementation of the commit b25ded4d.
Previously if there were tools launched from another tool,
the settings could be stored in a wrong TOOL_STATE object.
2017-03-06 15:04:27 +01:00
Maciej Suminski d1550b0cdb Renamed VIEW_CONTROLS::SETTINGS to VC_SETTINGS.
Because nested types cannot be forwarded.
2017-03-06 15:04:27 +01:00
Maciej Suminski 906ee77dbf Fixed VIEW_ITEM memory leaks 2017-03-02 23:57:13 +01:00
jean-pierre charras 8526935183 GAL: better progression between zoom in/zoom out (in/out/in sequence keeps the same zoom value) 2017-03-01 13:00:42 +01:00
Jon Evans 0afb249447 Add drawing priority support to VIEW
Call UseDrawPriority( true ) after creating GAL to enable.

VIEW::Add() gets a new optional argument to specify the draw order
when adding an item.  If the new argument is left default, the draw
order will increment with each call of VIEW::Add().

Fix std::bind calls after change to VIEW::Add
2017-02-28 14:47:20 +01:00
Maciej Suminski b25ded4d90 Store VIEW_CONTROLS settings when tools are switched
Fixes: lp:1663783
* https://bugs.launchpad.net/kicad/+bug/1663783

Fixes: lp:1667580
* https://bugs.launchpad.net/kicad/+bug/1667580
2017-02-24 16:47:19 +01:00
Maciej Suminski 57050cdeb3 Introduced VIEW_CONTROLS::SETTINGS to keep settings
The new class facilitates saving and restoring VIEW_CONTROLS
settings such as cursor visibility, snapping, etc.
2017-02-24 13:33:17 +01:00
Maciej Suminski 6561c8e61a Fixed a crash occuring on closing pad properties dialog in Windows
Fixes: lp:1660276
* https://bugs.launchpad.net/kicad/+bug/1660276
2017-02-07 00:07:43 +01:00
Maciej Suminski 3c61b16e7b Code formatting 2017-01-18 13:22:40 +01:00