Jeff Young
cd5f727880
Fix off-by-1 errors in zoom menus & use zoom steps in GAL canvas.
...
Also bumps the maximums a bit (at user request).
Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
2018-05-25 13:01:58 +01:00
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
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
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
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
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
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
jean-pierre charras
6eb2000b69
fix Coverity warning (CID 151565) (CID 155147)
2017-04-01 20:05:33 +02:00
Maciej Suminski
906ee77dbf
Fixed VIEW_ITEM memory leaks
2017-03-02 23:57:13 +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
3c61b16e7b
Code formatting
2017-01-18 13:22:40 +01:00
Maciej Suminski
004ca3c6f9
Fixed a memory leak in VIEW_ITEM (proper way of doing 9bc2bb2
)
...
The problem with simple deleting VIEW_ITEM_DATA upon VIEW_ITEM removal was
caused by the default copy constructors that copied pointers.
Once a copy of an item was destroyed, the VIEW_ITEM_DATA has been
destroyed, effectively invalidating m_viewPrivData for the other item.
2017-01-16 14:57:50 +01:00
Chris Pavlina
99bfa2fea2
Revert "Fixed a VIEW_ITEM memory leak"
...
This reverts commit 9bc2bb2651
.
Fixes: lp:1656481 (pcbnew segfault in KIGFX::VIEW_ITEM_DATA::getGroup)
https://bugs.launchpad.net/kicad/+bug/1656481
2017-01-13 21:37:31 -05:00
Maciej Suminski
9bc2bb2651
Fixed a VIEW_ITEM memory leak
2017-01-12 15:41:00 +01:00
jean-pierre charras
fff449ecf0
Performance counter rework: Add comments, fix coding style issues.
2016-12-31 13:00:24 +01:00
Simon Richter
ac9f858813
Performance counter rework
2016-12-31 12:57:42 +01:00
jean-pierre charras
dec2d6e8cc
Fix a few Coverity warnings. A bit of clean code in export_vrml.cpp.
2016-12-30 12:40:05 +01:00
Maciej Suminski
effc8bebb1
Store view flip setting between canvas changes
2016-12-12 16:45:52 +01:00
Maciej Suminski
027515f4e1
Fixed refreshing after flipping the view
2016-12-12 16:45:52 +01:00
Maciej Suminski
7ad5fca6de
More code formatting, updated copyright headers
2016-12-12 16:45:52 +01:00
Maciej Suminski
8f924ed125
Added checks to ensure VIEW_ITEM_DATA != nullptr.
2016-12-12 16:45:52 +01:00
Maciej Suminski
89055c4425
Code formatting
2016-12-12 16:45:52 +01:00
Tomasz Włostowski
da28e163d2
Optimizations/fixes to the VIEW/GAL classes:
...
- much faster Cairo rendering (outperforms legacy)
- improvements in VIEW update handling
- fixed issue with grid rendering in flip view mode
2016-12-12 16:45:52 +01:00
Tomasz Włostowski
3f7c5a0845
fixed post-rebase issues
2016-12-12 16:45:52 +01:00
Tomasz Włostowski
1c1f4e9a50
Refactoring of VIEW/VIEW_ITEM classes:
...
- Remove dependency of EDA_ITEM on VIEW
- VIEW_ITEM is now a pure virtual interface
2016-12-12 16:45:52 +01:00
Tomasz Włostowski
27a10e8597
Multiple simplifications to GAL tools in PCBNew:
...
- Finalize transition to BOARD_COMMIT (removed all remaining uses of PICKED_ITEMS_LIST) and implicit view/ratsnest updates
- Simplified SELECTION class, it now can be directly added to a VIEW
- Removed unnecesary casts and templates
- Introduced C++11 features (range based for, lambdas) where they improve code readability
- Added non-undoable COMMITs, which can be used to propagate change notifications to interested listeners (e.g. ratsnest/view)
2016-12-12 16:45:52 +01:00
Simon Richter
1b2fd6a382
Replace BOOST_FOREACH with C++11 range based for.
2016-06-29 16:07:55 -04:00
Maciej Suminski
d9f4877c94
Fixed a crash when starting pcbnew with OpenGL GAL.
2016-05-09 17:23:01 +02:00
Maciej Suminski
702be4903f
Vertices are stored in GPU memory (OpenGL GAL).
2016-05-02 16:12:16 +02:00
Maciej Suminski
36dd6eb6b3
GAL profiling output is enabled with WXTRACE env variable.
2016-05-02 15:56:17 +02:00
Simon Richter
da9ca2def2
Avoid cast from const_iterator to iterator
...
The standard library requires iterators passed to functions that modify the
container to be mutable iterators, but GCC's implementation accepts
const_iterator in some places where these are only used to mark a place,
but the actual modification happens through a different parameter.
As this breaks implementations that use the passed iterator to modify the
container (e.g. because they use a different data organization), this is
not portable; because we already have a non-const reference to the
container anyway, this is trivially fixed as well.
2016-01-17 12:31:00 -05:00
Maciej Suminski
6ad6f0bde2
Corrected VIEW::ToScreen().
2015-07-01 03:22:50 +02:00
Maciej Suminski
28a270a328
Refactored grid origin point drawing (GAL).
2015-06-18 17:51:53 +02:00
Maciej Suminski
d89d1d49a3
Fixed ghost effect in GAL view.
2015-06-04 14:54:07 +02:00
Maciej Suminski
4026cb6c58
Moved zoom limits and area boundaries handling to VIEW.
2015-05-18 13:48:13 +02:00
Maciej Suminski
d281d86eee
Fixed undo/redo display refresh for miras & dimensions (GAL).
2015-04-17 12:15:07 +02:00
Maciej Suminski
9e8719d3ff
Fixed overlapping segment endings in OpenGL view.
2015-03-30 14:09:56 +02:00
Tomasz Włostowski
8bd9dd49bb
view: added quick hiding mechanism in VIEW/VIEW_ITEM
2015-02-18 00:43:02 +01:00
Maciej Suminski
8a5fedb728
Code formatting and cleaning.
2014-07-09 11:22:43 +02:00
Maciej Suminski
5134781a38
GAL view in pad properties dialog - initial version.
2014-07-09 11:22:43 +02:00
Maciej Suminski
0fc93666c6
Rework to support multiple views with OpenGL GAL canvas.
2014-07-09 11:22:42 +02:00