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
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
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
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
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
jean-pierre charras
e14a1656db
Add comments. Gerbview: in legacy mode, do not display D_Code id text when it is too small to be readable.
2017-11-13 09:11:54 +01:00
Tomasz Włostowski
8a09a1d329
refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there
2017-11-03 20:02:06 +01: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
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
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
jean-pierre charras
e5137f4eb4
Fix a few doxygen warnings
2017-06-21 10:01:39 +02:00
jean-pierre charras
1466d0cee6
Fix a few doxygen warnings
2017-06-18 09:18:41 +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
74847bf8ff
Code formatting and clean-up
2017-04-20 14:01:38 +02:00
Jon Evans
3ec28e2acf
Refactor layer enumerations to all live in the same place
2017-03-30 16:01:48 -04: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
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
e34b73e187
Do not freeze cursor when a tool was cancelled using the context menu
...
dispatchContextMenu() stores the cursor position before displaying a
menu, so the tools use the original cursor position when processing
events (instead of the mouse position pointing to a menu entry). Later,
the previous position has to be restored, but if in the meantime the
tool was cancelled - previous settings were restored to a wrong tool.
2017-02-24 16:55:18 +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
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
Maciej Suminski
c8676db84e
Fixed panning & cursor control with arrow keys in flipped view
2016-12-12 16:45:52 +01:00
Maciej Suminski
effc8bebb1
Store view flip setting between canvas changes
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
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
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
59c81976dc
Explicitly mark overriding functions.
2016-09-24 14:53:15 -04:00
Maciej Suminski
74d53e517c
VIEW_GROUP objects redraw itself after a change
2016-09-12 11:50:06 +02:00
Maciej Suminski
0ef866ee74
Code formatting
2016-08-15 17:16:53 +02:00
Tomasz Wlostowski
df50a10510
VIEW: replace boost with std
2016-08-15 17:16:45 +02:00
Maciej Suminski
d9f4877c94
Fixed a crash when starting pcbnew with OpenGL GAL.
2016-05-09 17:23:01 +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
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
jean-pierre charras
c8f8256329
Fix 2 minor issues in SVG plots: sometimes a color was not good. Rectangles with 0 vertiacl or horizontal size are not plot.
...
Minor code cleaning.
Also fix a minor coverity warning about a not initialized member.
2015-07-13 20:36:06 +02:00
Jon Neal
fdf5b821f0
Add centering cursor on zoom to GAL.
2015-07-09 10:18:27 +02:00
Maciej Suminski
6ad6f0bde2
Corrected VIEW::ToScreen().
2015-07-01 03:22:50 +02:00
Chris Pavlina
775f08b2bb
Eliminate "PAD has no layer" warning for valid pads.
2015-05-26 16:33:46 +02:00
Garth Corral
6eaf029a0e
Pinch to zoom for OS X.
2015-05-21 22:54:29 +02:00
Maciej Suminski
4026cb6c58
Moved zoom limits and area boundaries handling to VIEW.
2015-05-18 13:48:13 +02:00
Maciej Suminski
2043d4696f
Scrollbars (GAL).
2015-05-18 13:48:10 +02:00
Maciej Suminski
8390fec69d
Minor fixes.
2015-04-30 10:46:08 +02:00
Maciej Suminski
f2788a3086
Corrected way of storing cursor coordinates for context
2015-04-30 10:46:06 +02:00
Maciej Suminski
d281d86eee
Fixed undo/redo display refresh for miras & dimensions (GAL).
2015-04-17 12:15:07 +02:00
Maciej Suminski
bfb700c79b
Removed the remaining lines related to WebViewer. Undone reduced number of layer in VIEW.
2015-03-30 22:40:29 +02:00
Maciej Suminski
4dae107dab
Alternative depth range in OpenGL GAL.
2015-03-30 22:14:37 +02:00
Maciej Suminski
9e8719d3ff
Fixed overlapping segment endings in OpenGL view.
2015-03-30 14:09:56 +02:00
Maciej Suminski
143f52eb4d
VIEW_CONTROLS::CaptureCursor()
2015-03-10 13:20:38 +01:00
Maciej Suminski
4fb9bce354
Code formatting.
2015-02-18 17:53:46 +01:00
Tomasz Włostowski
8bd9dd49bb
view: added quick hiding mechanism in VIEW/VIEW_ITEM
2015-02-18 00:43:02 +01:00
Maciej Suminski
b0ad779ee4
Calming down the Coverity report.
2015-02-15 23:21:52 +01:00
Maciej Suminski
5447bb5914
bugfix: Pcbnew (Windows) crashes using selection tool in OpenGL or Cairo
2015-01-25 19:08:52 +01:00
jean-pierre charras
24f516f6ae
Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc.
2014-11-02 17:25:04 +01:00
Maciej Suminski
91e9df59d4
Fixed layers order after changing the active layer.
2014-07-14 11:36:34 +02:00
Maciej Suminski
5134781a38
GAL view in pad properties dialog - initial version.
2014-07-09 11:22:43 +02:00
Dick Hollenbeck
4578ea8b9e
1) Add 32 Cu Layers.
...
2) Change from legacy Cu stack to counting down from top=(F_Cu or 0).
The old Cu stack required knowing the count of Cu layers to make
sense of the layer number when converting to many exported file types.
The new Cu stack is more commonly used, although ours still gives
B_Cu a fixed number.
3) Introduce class LSET and enum LAYER_ID.
4) Change *.kicad_pcb file format version to 4 from 3.
5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their
meanings are typically flipped.
6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they
can die a quiet death, and switch to enum LAYER_ID symbols throughout.
7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions.
You will need to convert to the format immediately, *.kicad_pcb and
*.kicad_mod (=pretty) since legacy format was never going to know
about 32 Cu layers and additional technical layers and the reversed Cu
stack.
2014-06-24 11:17:18 -05:00
Tomasz Wlostowski
4121c27269
Clang-alike lightweight RTTI for pcbnew + type casting cleanup.
2014-06-06 11:44:21 +02:00
Tomasz Włostowski
5bf50ee910
VIEW: added CalculateExtents() method
2014-05-14 13:48:29 +02:00
Maciej Suminski
c3b448b633
Upstream merge.
2014-05-01 15:55:50 +02:00
Lorenzo Marcantonio
3f2c0e1a8d
TRACK/SEGVIA cleanup
...
- SEGVIA becomes VIA
- Drill size moved from TRACK to VIA
- Removed shape from TRACK, becomes ViaType in VIA
- GetTrace becomes GetTrack, for uniformity
- Some minor constification and typo fixes
2014-04-25 08:00:04 +02:00
Maciej Suminski
89161331e4
Fixed refreshing issues (DRC, new items after reloading netlist and probably many other places).
2014-04-07 15:35:50 +02:00
Maciej Suminski
dbc4a8f292
GAL zooms in and out using the default hot keys (F1/F2).
...
Screen size is saved in VECTOR2I instead of VECTOR2D.
2014-03-20 08:47:31 +01:00
Maciej Suminski
afc56d3f6f
Moved panning boundaries and scale limits from VIEW to VIEW_CONTROL.
2014-03-12 17:09:53 +01:00
Maciej Suminski
b6e3b3a3f9
Merged selection_tool branch.
2014-03-06 10:43:40 +01:00
Maciej Suminski
e6598e9d41
Added VIEW::ToWorld( double ).
...
TOOL_EVENT message is supposed to contain string as parameter.
Added missing header for class_drawsegment.h (KiROUND).
Renamed SELECTION_TOOL::containsSelected() to SELECTION_TOOL::selectionContains().
2014-02-27 16:13:27 +01:00
Maciej Suminski
5ac699776d
Revisiting GAL:
...
- VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame.
- VIEW::InvalidateItem() made private.
- VIEW_LAYER::enabled -> visible
- Some functions moved to header files.
2014-02-21 16:57:18 +01:00
Maciej Suminski
597e98dbf4
Cursor is in world coordinates.
2014-02-13 20:23:28 +01:00
Maciej Suminski
0f026bbe1d
Fixed snapping item in a wrong spot bug.
2014-02-06 17:29:13 +01:00
Maciej Suminski
b317894ea0
Snapping settings are valid while autopanning.
2014-02-04 09:44:16 +01:00
Maciej Suminski
3dc9f295a4
Fixed cursor force position option.
2013-12-20 16:07:58 +01:00
Maciej Suminski
84c496e138
Upstream merge
2013-12-19 11:15:27 +01:00
Maciej Suminski
08fd9d8cbd
Overridden ViewUpdate() for MODULE class, so it handles its pads, drawings and texts.
2013-12-02 14:35:05 +01:00
Maciej Suminski
89b80b2bcd
Merged rtree.h, to avoid code duplication.
...
Fixes the case, when waste is never greater then the worst case and seeds assignment does not occur.
2013-11-13 17:03:22 +01:00
Dick Hollenbeck
42ef7f6215
*) Start removing some of the problematic "<%s>.." format strings, which won't
...
pass into an HTML rendering panel and otherwise look goofey.
*) Implement BOARD::Move() can call it from EAGLE_PLUGIN::Load().
*) When USE_FP_LIB_TABLE, tolerate blank nicknames in FPIDs coming from eeschema.
See the switch for this in pcbnew/netlist.cpp as ALLOW_PARTIAL_FPID.
*) Add an assert and a try catch block to figure out that View does not
like some eagle pcb board. bitset::set() is getting a -1 value and firing
an exception.
2013-11-01 19:24:38 -05:00
Maciej Suminski
bc305859b2
Mainly case changes.
2013-10-14 20:40:36 +02:00
Maciej Suminski
0ac3e1fbf2
Namespace KiGfx->KIGFX.
...
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Suminski
22045b61ea
Converted tabs to spaces. Removed trailing whitespaces.
2013-10-14 13:43:57 +02:00
Maciej Suminski
54946f46f7
Fixed memory leak caused by ViewUpdate() with VIEW_ITEM::GEOMETRY/LAYER parameters.
2013-10-02 13:57:21 +02:00
Maciej Suminski
86000832fe
Added typedefs for VIEW_GROUP iterators. Fixed improper order of layer drawing for VIEW_GROUP items.
2013-10-02 10:19:48 +02:00
Maciej Suminski
87a9964c78
VIEW_GROUP now does not change depth during drawing. Introduced functions for manipulating stored items.
...
FIxed problem of overlay being covered by other layers while panning.
Few minor fixes.
2013-10-01 16:55:33 +02:00
Maciej Suminski
6b74b5771a
Even more code comments and reformatting.
2013-09-27 18:51:21 +02:00
Maciej Suminski
d1578e4e1a
Fixed cvpcb build.
2013-09-24 16:12:02 +02:00
Maciej Suminski
1de8eba49e
Added functions for refreshing the layer set occupied by a VIEW_ITEM.
2013-09-24 15:48:04 +02:00
Maciej Suminski
a991cb4470
Changed the way of refreshing canvases (both standard & GAL).
2013-09-20 17:29:32 +02:00