Leaving the forced position on results in the auto-line linking to a pin
for far longer than we intend if there are other hits in the area of the
cursor
Fixes https://gitlab.com/kicad/code/kicad/issues/9321
Calling UpdateItem() may be performed by in a common loop, e.g. for(
SCH_ITEM* item : GetScreen()->Items() ) or similar. We cannot call
GetScreen()->Update( SCH_ITEM* ) in this routine as it will remove and
re-add the item to the RTree, invalidating iterators. If needed, the
items need to be cached to an external container before updating
Fixes https://gitlab.com/kicad/code/kicad/issues/9318
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.
Keeps the lines connected but doesn't solve the crossed-wire mixups.
This allows common usage (mirroring labels/rotating segments) and leaves
prevention of the crossed wires to the user.
We can't really prevent crossed wires when rotating e.g. a part with
wires connected to 4 sides and users will not expect that. But we
should not disable useful features like mirroring multiple parallel
items to avoid a known impossible situation
Also provides an alternative solution to 345f506f0c that allows us to
rotate groups without destroying connections on hover
Fixes https://gitlab.com/kicad/code/kicad/issues/8403
Fixes https://gitlab.com/kicad/code/kicad/issues/8523
doSelectionMenu returns false to indicate a cancelled menu. This needs
to be handled in selectPoint when directly accessing doSelectionMenu in
the same manner as SelectionMenu() events
Fixes https://gitlab.com/kicad/code/kicad/issues/9218
We have a fixed bottom-align for the text and labels in eeschema.
Therefore, mirroring vertically needs to account for the text's offset
from the bounding box center.
Fixes https://gitlab.com/kicad/code/kicad/issues/9208
The select-single-wire stuff is no longer needed, and the prefer-wire-ends
stuff needs to be distance-based.
Also improved wire hit-testing to include bubbles the size of the dangling
symbol at each end.
Fixes https://gitlab.com/kicad/code/kicad/issues/9187
1) Expand the accuracy to at least the grid spacing
2) Move pin-selects-symbol logic to Selectable()
3) Recode pick-closest algorithm to handle exactHits and inexactHits
separately
4) Remove pin target from bounding box in favour of expanding it to
at least as wide as the pin decoration (this prevents the accuracy
off the end of the pin from growing too large)
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.
Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).
Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.
Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.
See additional comments in the bug report.
Fixes https://gitlab.com/kicad/code/kicad/issues/9160
While it would make more sense to have them both use the old canvas
algorithm (of only assigning to the members), I'd be *very* hesitant
to change the Setup Dialog and underlying machinery this late in the
6.0 release.
Fixes https://gitlab.com/kicad/code/kicad/issues/9160
We have two cases where we might be requesting a disambiguation menu.
In one case, we already have the event loop waiting and we need to run
the selectionMenu through the action system. In the other case, the
tool isn't on the stack and won't activate. Here we need to run
directly and we are assured of not crashing because the tool isn't
active.
Fixes https://gitlab.com/kicad/code/kicad/issues/9154
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
Don't show the clean up sheet pins context menu entry when the selected
sheet doesn't have any pins to clean up.
Remove sheet has no pins to clean up nag dialog now that the context menu
entry isn't shown unless there are pins to clean up.
Having the logic split between three different paths was
a bit much, this should hopefully be a bit easier to
maintain. All save logic now goes through SaveProject;
individual file writing is now a private function.
Also change Save As to Save Copy As in project manager
mode, as we don't want to change projects from inside
the editor in project manager mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9015
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
The first time a DIALOG_SHIM was created, with a given size, this size
was not taken in account. This this is now forced.
(when recreated during a session, this is the last dialog size that is used)
When doing a schematic cleanup, for instance, we were breaking wires
and pushing undo records on to the stack. Needless to say, this was
pretty unexpected for the rest of the undo framework and caused all
kinds of mayhem (including crashes in some cases).
Fixes https://gitlab.com/kicad/code/kicad/issues/8704
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road. Better
to just escape them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
SCH_PIN wasn't handling the legacy empty string token (~), but
more importantly this will allow text variable resolution specific
to the schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/8625
We moved it earlier because AddItemToScreenAndUndoList() was clearing
it, but it needs to be set for AddItemToScreenAndUndoList() too.
Fixes https://gitlab.com/kicad/code/kicad/issues/8289
Units in library items start at 1. 0 is reserved for "all units".
Previous code was requesting an out of range index due to an assumption
that units start at 0.
Undo does some fairly major redraws (including setting the current
screen), all of which drop the selection and cancel interactive tools.
Make sure the selection is re-built *after* all those run.
Fixes https://gitlab.com/kicad/code/kicad/issues/8492
The only subtle difference is that Duplicate() does not modify the
clipboard contents so we need to keep a local variable in which to
store the result of a Copy()
Use justification instead of orientation relative to the anchor point when
describing text direction and alignment. This seems to be the preferred
method by most users so hopefully this will eliminate some confusion.
Fix a bug in the s-expression schematic parser that failed to take into
account how graphical text alignment is defined for graphic text objects
compared to label text objects.
Fixes https://gitlab.com/kicad/code/kicad/issues/6489
ADDED Paste Special... action in pcbnew
CHANGED Additional options for Paste Special... in eeschema, including
"Assign unique reference designators to pasted instance"
Duplicates are reannotated on paste in the same way in pcbnew and
eeschema such that when copying and pasting the same block in the
pcb and schematic, the reference designators will match.
Save sheet and symbol instance information to the clipboard on copy
Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.
Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates. Use "Update
Schematic from PCB" tool to update reference designation changes.
Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state. The update schematic from board tool is
the correct method to sync any changes from the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
When activate the new symbol placement, the mouse cursor is outside the canvas.
Therefore a autopan was started and not so easy to stop.
Now the mouse cursor (and the graphic cursor) are moved to a better location inside the canvas.
Fixes#8156https://gitlab.com/kicad/code/kicad/issues/8156
We've been doing this for some time to wires that are attached to
the moving block (and therefore have the other end anchored). However
we also need to apply it when dragging a single end of a wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/7807
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
After commit 9535153f9e there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).