Commit Graph

168 Commits

Author SHA1 Message Date
Maciej Suminski 2eefa11732 SELECTION has-a VIEW_GROUP instead of being-a VIEW_GROUP
Fixed numerous warnings caused by hidden overloaded methods
provided in both classes (Add(), Remove(), etc.)
2017-01-18 13:22:41 +01:00
Maciej Suminski c758f434c0 Removed unused fields in VIEW & ANTIALIASING_SMAA classes 2017-01-18 13:22:18 +01:00
John Beard d7db84e282 Break out tools' common menu functions and ownership
Add a class TOOL_MENU, which provides a management class for a
CONDITIONAL_MENU and a set of CONTEXT_MENUs. The aim of this is to
provide a central place where all TOOL_INTERACTIVEs can get a "basic"
context menu that either they or other tools can register new items and
sub-menus against.

This means that "top-level" tools no longer need to manage the lifetimes
of any CONTEXT_MENUs that they add, and can also delegate simple menu
display functions.
2017-01-12 14:33:57 +01:00
John Beard 378f5cce33 Don't show separator in Select tool if not needed
If the SELECTION_TOOL's Select... menu is not shown, the separator under
it should also not be shown, so use the same SELECTION_CONDITIONS to
enforce this.
2017-01-11 11:15:25 +01:00
Maciej Suminski 89055c4425 Code formatting 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
decimad 6a9c1cb6a1 Split the undo/redo event into the two stages "pre" and "post" for convenient synchronization of dependent state. 2016-09-23 13:29:25 +02:00
Maciej Suminski 8590809c7a Selection tool fix to enable selecting overlapping items
Fixes: lp:1499022
* https://bugs.launchpad.net/kicad/+bug/1499022
2016-09-15 13:25:08 +02:00
Tomasz Wlostowski 1924507001 Added a PCB_TOOL subclass. 2016-09-12 11:50:06 +02:00
Maciej Suminski ff6bdeee4b Removed a number 'if(m_editModules)' sections from pcbnew tools. 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
Simon Richter da5699de0a Replace boost::shared_ptr with std::shared_ptr. 2016-06-29 11:09:55 -04:00
Michael Steinberg fde12ebd25 Replace boost::function and boost::bind with their std:: counterparts 2016-06-29 12:23:11 +02:00
Maciej Suminski ad66af66af Highlight an item when context menu is displayed (GAL). 2016-05-09 10:41:11 +02:00
Tomasz Wlostowski 5349eb4179 fixed segfault in selection tool 2016-02-08 15:12:59 +01:00
Maciej Suminski 75c8094b5a Make DRC markers not editable with the standard tools (GAL). 2016-01-20 15:22:09 +01:00
jean-pierre charras e175a96be4 Pcbnew: Enhancement: in Get footprint (hotkey 'T') : better footprint selector dialog. 2015-12-20 19:47:52 +01:00
Simon Wells 5bc6a55015 Changed behaviour so if the menu is closed without selection by pressing esc or clicking outside of the menu that the last highlighted option wont be selected 2015-10-08 02:32:36 +13:00
Maciej Suminski 0bd85fd8d1 Fixed a minor memleak. 2015-08-07 18:20:49 +02:00
Tomasz Wlostowski 9c2bcb2f3c Fixed crash on right click on zone with GAL mode. 2015-08-03 11:53:58 +02:00
Maciej Suminski 3049bc1d5f Fixing SELECTION_TOOL heuristics, take #2. 2015-07-30 13:49:35 +02:00
Maciej Suminski 4718b6d7c8 Code formatting. 2015-07-30 13:49:35 +02:00
Maciej Suminski 63b0e63152 Prevent 'select copper' & 'select trivial connection' from picking modules. 2015-07-28 17:33:18 +02:00
Maciej Suminski 656790a672 Make module texts selectable if overlapping with module pads. 2015-07-24 09:42:46 +02:00
Maciej Suminski d6bc33bd42 Removed a few more memory leaks and fixed crash on exit. 2015-07-24 09:42:46 +02:00
Maciej Suminski 4b45146c46 Improvements to the SELECTION_TOOL heuristics & sanitization rules. 2015-07-15 14:08:52 +02:00
Maciej Suminski 59af7a96f8 Minor code cleaning. 2015-07-15 14:08:52 +02:00
Maciej Suminski ca27eeb5c7 Fixed "select copper connection". 2015-07-09 20:04:54 +02:00
Maciej Suminski f0a1f6dd78 Hotkeys for selecting trivial or copper connection (GAL). 2015-07-09 17:11:34 +02:00
Maciej Suminski 1b208e0a5e Display info in the message panel if only one item was selected using area selection tool. 2015-07-03 20:58:12 +02:00
Maciej Suminski e91fdd0079 Removed redundant transition in SELECTION_TOOL. 2015-06-19 17:32:32 +02:00
Maciej Suminski fa3d074ca4 Find command zooms in found items (GAL). 2015-06-18 17:51:52 +02:00
Maciej Suminski ac10ca40f8 Net highlighting is moved to a separate TOOL_ACTION. 2015-06-18 17:51:50 +02:00
Maciej Suminski dd5275f6c6 Minor SELECTION_TOOL fixes. 2015-06-16 14:51:39 +02:00
Maciej Suminski 209e630873 Disable net highlighting after loading a new board. 2015-06-04 14:54:08 +02:00
Maciej Suminski 01c9f09833 wxWidgets under OS X require wxMenuItem ids to be >0. 2015-05-18 13:48:13 +02:00
Maciej Suminski 4fe65715a2 Added trivial connection selection (GAL). 2015-05-18 13:48:10 +02:00
unknown 04ffd0a4ac i18n pcbnew GAL popup menu entries 2015-05-03 17:53:44 +02:00
jean-pierre charras d41bc31c49 Fix bug #1447905 (very minor bug, in fact). Fix a few minor coding style issues.
Fix 2 coverity warnings.
2015-05-03 08:31:14 +02:00
Maciej Suminski 872259981a CONDITIONAL_MENU supports separators and ordering. 2015-04-30 10:46:08 +02:00
Maciej Suminski 958046ddb2 Moved SELECTION_TOOL context menu to a separate class. 2015-04-30 10:46:08 +02:00
Maciej Suminski 9ef9b7b8e1 Preliminary selection mode for SELECTION_TOOL. 2015-04-30 10:46:07 +02:00
Maciej Suminski b8295b6af8 Code formatting. 2015-04-30 10:46:07 +02:00
Maciej Suminski 6379d80636 Zoom & grid menus for GAL canvases. 2015-04-30 10:46:05 +02:00
Maciej Suminski 06b978b829 Refactored CONTEXT_MENU, added handler for updating. 2015-04-30 10:46:05 +02:00
Maciej Suminski 4be876a13a Expandable CONTEXT_MENUs (GAL). Minor CONTEXT_MENU 2015-04-30 10:46:04 +02:00
Maciej Suminski 946b9d1933 setTransitions() are called automatically for tools. 2015-04-30 10:46:03 +02:00
Maciej Suminski 5c984aa069 Parametrized TOOL_ACTIONs. 2015-04-30 10:46:01 +02:00