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
Allows 0 to 4 chamfered corners, not only one.
A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
When adding colors to length tuner, we depend on the window background
color, which can be set by the user, resulting in an unreadable text.
This uses the HSL conversion to detect which shade it should use for the
coloring.
Also adds test cases for round-trip HSL and HSV conversion
Fixes: lp:1814530
* https://bugs.launchpad.net/kicad/+bug/1814530
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.
As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.
This resolves a circular dependency previously detected and also
simplifies CMakeLists.
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.
Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.
This avoids a circular dependency that was previously reported
by static analysis.
Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)
Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
Fixes and issue where forces were calculated using the current track
width even in differential placer mode where the tracks are specified by
the differential pair width.
Fixes: lp:1814480
* https://bugs.launchpad.net/kicad/+bug/1814480
Snap/Grid modifier follow preferences from 05483a06c6. Brings Shift/Alt
modifiers into alignment with drawing tools. Shift modifier still
conflicts when choosing end item with the complete track click-modifier.
This will be addressed in v6 with a larger preference setting.
Snapping to item options were partially disconnected when unifying
framework. This re-attaches the options and adds the additional option
for graphical items.
Fixes: lp:1801377
* https://bugs.launchpad.net/kicad/+bug/1801377
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
Dynamic casts should only be used when we explicitly check for the
resulting pointer to be NULL. Where we know the class is castable we
can use static_cast, save on overhead and ensure our resulting pointer
is non-null.
m_dragstatus is set to true when a valid route is created given the
user's constraints. We need to check this before committing the route
to the board.
Fixes: lp:1794810
* https://bugs.launchpad.net/kicad/+bug/1794810
Snapping while dragging depends on the current net being assigned during
dragging. This initializes the placer to hold the current net while
performing inline dragging. The placer is reset along with the dragger
in StopRouting(). This fixes the difference in snap between drag and
create new route.
( cherry-picked from 219695953 )