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
Maciej Suminski
c758f434c0
Removed unused fields in VIEW & ANTIALIASING_SMAA classes
2017-01-18 13:22:18 +01:00
Baranovskiy Konstantin
3dc2050498
Improved MousewheelPAN mode.
2017-01-17 16:34:11 -05: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
Maciej Suminski
74d53e517c
VIEW_GROUP objects redraw itself after a change
2016-09-12 11:50:06 +02: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
Maciej Suminski
f968556f9a
Smoother autopanning.
2016-05-02 15:56:11 +02:00
Bernhard Stegmaier
f8abe9c191
Add support for optional touchpad panning.
2016-02-24 14:53:02 -05:00
Bernhard Stegmaier
3e2b4244f9
OSX: add support for wxMagnifyEvent on OSX builds using wxWidgets 3.1.0 or greater.
2016-01-24 19:18:29 -05: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
d010703eaf
Fixed cursor freeze in pcbnew (GAL).
2015-07-24 10:58:47 +02:00
Maciej Suminski
f7fa0852b5
Fixed screen scrolling on zooming in/out.
2015-07-24 09:42:45 +02:00
Maciej Suminski
cd205db812
VIEW_CONTROLS::GetMousePosition() returns VECTOR2I.
2015-07-24 09:42:45 +02:00
Maciej Suminski
36d3d9f78e
Cursor warps to the drag origin (GAL).
2015-07-15 17:32:30 +02:00
Jon Neal
fdf5b821f0
Add centering cursor on zoom to GAL.
2015-07-09 10:18:27 +02:00
Maciej Suminski
3cb095b7c2
GAL canvases update status bar, message panel & zoom widget.
2015-07-03 20:58:12 +02:00