Commit Graph

36 Commits

Author SHA1 Message Date
Maciej Suminski 5d1ec2b204 Restored invocation of SELECTION_TOOL commands with TOOL_ACTIONs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 6e0bd1eedc Adapted tools to PCB_BASE{_EDIT}_FRAME. 2014-07-09 13:50:27 +02:00
Maciej Suminski 7ade7db078 SELECTION_TOOL got a new mode to edit MODULEs. 2014-07-09 12:10:27 +02:00
Maciej Suminski a6dac245c0 Removed TOOL_ACTIONs: selectionSingle, selectionClear. SELECTION_TOOL methods are called directly instead. 2014-07-09 11:59:24 +02:00
Maciej Suminski 517bfa3570 Minor code cleaning. 2014-06-04 18:01:01 +02:00
Maciej Suminski 6b222d19d5 Added preference for selecting tracks/vias/graphics if there is a module present in the selection point. 2014-05-13 11:22:51 +02:00
Maciej Suminski a6917280fe Added net highlighting. 2014-04-04 17:40:00 +02:00
Maciej Suminski 6a1d344541 Instant dragging (without prior selection). 2014-03-18 16:25:46 +01:00
Maciej Suminski f6959c039c Comments. 2014-03-18 11:04:52 +01:00
Maciej Suminski 235da6084b SELECTION_TOOL emits event notifying about selecting/deselecting/clearing selection. 2014-02-27 17:27:58 +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 625dcddb27 Added 2 tool actions:
- pcbnew.InteractiveSelection.Single for selecting a single item
- pcbnew.InteractiveSelection.Clear for clearing the selection
Made SELECTION_TOOL::clearSelection private.
2014-02-04 16:03:56 +01:00
Maciej Suminski 82ca611ed3 SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. 2014-02-04 11:37:54 +01:00
Maciej Suminski 873235304e SELECTION_TOOL uses ITEMS_PICKED_LIST to store selected items.
Modifications done using the EDIT_TOOL are saved using the default KiCad's undo buffer.
If there is only one item selected, info about the item is displayed in the bottom status bar.
2013-12-18 14:33:34 +01:00
Maciej Suminski d8acd1c718 Moved Init() & Reset() from TOOL_INTERACTIVE to TOOL_BASE.
Added REASON enum for Reset() function, so tools will know why a reset occured.
Fixed SELECTION_TOOL (it was bailing out, when a new board was loaded and some items were still selected).
Added removal of VIEW_ITEM groups after changing layers and removing items.
2013-12-09 10:42:38 +01:00
Maciej Suminski 27c7eb5dce The Selection Tool displays information about selected items. ClearSelection() made public. 2013-12-04 10:58:51 +01:00
Maciej Suminski 24a317ce28 The Selection Tool is always active. Removed entries for toolbar menu and hotkeys for the tool. 2013-12-03 17:11:22 +01:00
Maciej Suminski 07a5774a1e Renamed MOVE_TOOL to EDIT_TOOL. 2013-12-03 16:09:03 +01:00
Maciej Suminski bec2e9b178 Added some comments & asserts. 2013-12-03 15:17:43 +01: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 2ee858072f Moved VIEW_GROUP creation to the selection tool. In this way selected items are always drawn on overlay, not only when dragged. 2013-10-02 10:21:05 +02:00
Maciej Suminski 35721397bd Moved common actions to a separate file. 2013-09-27 20:52:34 +02:00
Maciej Suminski 87b3f2e499 Added Init() to TOOL_INTERACTIVE, allowing to set up things that are needed to be initialized only once.
TOOL_ACTIONs can be run from CONTEXT_MENU after adding them.
Move tool actions are available to be run from CONTEXT_MENU displayed after right mouse button click on selected items.
Added some asserts to check the code.
2013-09-26 18:38:58 +02:00
Maciej Suminski 12b8714aff Different way of handling CONTEXT_MENU in the selection tool. Removed some unnecessary lines. 2013-09-26 14:09:56 +02:00
Maciej Suminski 2c03bf4109 Removed TA_ActivateTool (now tools are invoked by sending TA_Action event, with the tool name as string parameter).
Developed TOOL_Action class & added ActionManager. Hot keys registered by tools are processed.
Selection & move tool can be invoked by a hot key.
2013-09-19 17:02:57 +02:00
Maciej Suminski d2c47a74f2 Parts of MODULEs are not selectable in multiple selection mode. 2013-09-09 10:10:02 +02:00
Maciej Suminski d213a26057 Smarter selection algorithm (does not allow to select both whole MODULE and its parts at the same time).
Cancel event works better (selection box does not appear after cancelling the selection tool).
Removed blinking selection box effect.
Model is accessed in more appropriate way (getModel() method).
2013-09-06 16:04:12 +02:00
Maciej Suminski 44bafd1c8f Improved selection rules. Added some comments to the selection tool. 2013-09-04 10:56:06 +02:00
Maciej Suminski 424aa28e1f Added SELECTION_TOOL::GetSelection() 2013-08-30 10:23:18 +02:00
Maciej Suminski d73d153665 Added selection boxes for texts. 2013-08-09 15:04:10 +02:00
Maciej Suminski 6af09fedda Added the additive mode for the selection area. 2013-08-09 10:18:48 +02:00
Maciej Suminski 12e10fd43a Reformatting. 2013-08-08 14:59:59 +02:00
Maciej Suminski 282995eaee Fixed disambiguation menu issue. 2013-08-08 14:50:32 +02:00
Maciej Suminski 7d5a456344 Code reformatting. 2013-08-06 10:30:09 +02:00
Maciej Suminski f193e389ec Moved highlighted flag from VIEW_ITEM to EDA_ITEM. Added brightened and selected flag to EDA_ITEM. 2013-08-06 09:31:08 +02:00
tomasz. 69a44d5f13 pcbnew: hooked Tool Framework into the edit panel. Added a sample selection tool (not fully functional). 2013-08-02 16:53:50 +02:00