When dragging, you will seldom want to snap to the original item. This
commit prevents the "size of track" snap to the original item and
replaces it with an auxilary grid origin for the snap. This means
effectively that the snap will happen to grid for the original item
unless the cursor is closer to the original item line than it is to the
grid crossing.
Fixes: lp:1820248
* https://bugs.launchpad.net/kicad/+bug/1820248
The selection for interactive drag uses cursor position off grid to
choose the element for dragging. We pass the same value into the start
dragging routine to choose the correct end of the element.
Fixes: lp:1813665
* https://bugs.launchpad.net/kicad/+bug/1813665
When changing the track width, we need to allow that the track's route
will change based on DRC, so force a move without changing position.
Fixes: lp:1785057
* https://bugs.launchpad.net/kicad/+bug/1785057
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).
Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
After an action is completed that required the screen to pan when the
cursor reaches the edge of the screen, we should release the cursor to
allow the user to move their mouse without panning.
Fixes: lp:1763860
* https://bugs.launchpad.net/kicad/+bug/1763860
- Ordering of Hotkey list by function
- Use Hotkey assignment instead of hard-coded hotkey for length tuning
- Adjust default Length Tuning settings hotkey to CTRL-L so that we
don't overlap with "Lock" (overlaps are not editable)
Corrects an error in polyline estimation
Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.
Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.
Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
Track dragging forces the cursor position, which is still kept when PNS
router is launched again. It is avoided by resetting the force cursor
position option before running the event loop.
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.
Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.
Fixes: lp:1745981
* https://bugs.launchpad.net/kicad/+bug/1745981
Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
Some actions, such as select trivial connection, don't need the
user to choose which trace at a corner to start from -- either
one will do. Same for moving a simple trace corner.
Likewise, Edit in Footprint Editor shouldn't ask if you mean the
footprint or the pad. Obviously it's the footprint.
This change adds a CLIENT_SELECTION_FILTER which allows clients
to do tool- or action-specific filtering of the selection before
the disambiguation menu is run.
It also removes some tool- and action-specific code which was
in the selection_tool and shouldn't have been.
Fixes: lp:1708869
* https://bugs.launchpad.net/kicad/+bug/1708869
Delete events when using GAL are handled by only one tool handler
instead of ROUTER_TOOL and EDIT_TOOL both deleting items.
Fixes: lp:1715158
* https://bugs.launchpad.net/kicad/+bug/1715158
- added TOOL_INTERACTIVE::resetTransitions()
- made protected and moved TOOL_BASE::setTransitions() to TOOL_INTERACTIVE
- TOOL_MANAGER calls TOOL_INTERACTIVE::resetTransitions() instead of
setTransitions()
The attached patch fixes a bug where triggering InlineDrag while routing
is in progress will crash pcbnew. The problem is that the InlineDrag
event does not terminate performRouting. Once InlineDrag is finished
it will call StopRouting which deletes the m_placer. The Wait() in
performRouting will then return and it will crash as soon as it tries
to access the m_placer.
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to
change to casting the selected items to BOARD_ITEMs.
Fixed compilation warnings on clang (Tom)
This is used to provide menu entries that allows cancellation of
interactive drawing and routing tools without needing the keyboard.
It is provided in the drawing tools and the router tool.
The cancel event doesn't have any new functionality (e.g. track rip-up
for the PNS router - lp:1448460), this just adds it to the menu, where
it behaves the same as an Escape keypress.
Some grid/zoom tools are left in PCBNEW_CONTROL because they currently
depend on Pcbnew-specific class members. Once refactoring is done to
make it possible to use all zoom and grid controls outside of pcbnew,
these last tools can be moved to common to match their ACTIONs.
New virtual class ACTIONS is added as a member to EDA_DRAW_FRAME so
that the TOOL_DISPATCHER can have access to the appropriate derived
version of TranslateLegacyId()
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h
Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.
This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.
The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.
Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
When creating a copy of CONTEXT_MENU, always a CONTEXT_MENU instance was
constructed, whereas an inherited type should be used. Solved with
CONTEXT_MENU::create() that has to be overridden in inheriting classes.
Event & update handlers are now virtual functions, instead of setting
the handlers with Set{Event,Update}Handler().
There used to be a number of TOOL_ACTIONs that had entries both in
SetTransitions() and the event loop, which seemed redundant and
troublesome.
Now it is not necessary anymore, transitions setup is enough to execute
associated actions.
* Fix segfault caused by invalidation of the end item by
PNS_LINE_PLACER::UpdateSizes().
* GAL zone drawing tool updates the ratsnest after zone drawing is complete.
* Fixed performance issue in zones processing using strict simplification
only for the final filled area.