(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17009
(cherry picked from commit f4a085575a)
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.
And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.
Also reverts using the cache for drawing-sheet text. The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).
And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.
Removes all uses of GetCommandStr() and makes it private.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
If we do a real drag, the timer will be cancelled. If we don't, then
the user is still holding the mouse button down and would probably like
to see the menu. Otherwise it appears the action is dropped.
Moving points should not be overrided by disambiguation menu, so we
track where the disambiguation event started and only trigger the menu
if the mouse hasn't moved a full unit in x/y
Fixes https://gitlab.com/kicad/code/kicad/issues/9132
Previously, we were checking if the selection tool was the top of the
stack but this ignored many other "secondary" tools that might be
running such as the point editor. These still allow the selection tool
to handle events such as clicks. This change allows the selection tool
to handle clicks when it is the primary tool on the stack rather than
the top
Fixes https://gitlab.com/kicad/code/kicad/issues/9110
This standardizes selection tools in SELECTION_TOOL class to be able to
handle a long-click as asking for a non-heuristic disambiguation menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/8490