Grouping two symbols and then locking one of them (Lock position in its
properties) left the group in a broken state: dragging the unlocked symbol
pulled it away while the locked one stayed, and dragging the locked one
did nothing. The move simply dropped locked items, so the rest of the
group went without them.
A group with a locked member now does not move at all, whichever member
is dragged, and the status bar says why. This is the rule the item-groups
proposal (discussion #1070) set out for this case. The same rule applies
to the arrow keys and to the Align commands, which share
DiagramContent::removeNonMovableItems().
Also fixed on the way, for a plain selection with a locked symbol: a wire
between the locked symbol and one being dragged kept its user-placed text
moving with the dragged end. Such a wire is now redrawn only, as a wire to
an unselected symbol already is.
Checked in the GUI on two symbols joined by a wire (grafcet example),
master against this branch, positions read from the saved file:
- drag the unlocked member: master moves it 190 px, this branch moves
nothing and shows the message
- arrow keys on the selected group (3 runs each): master moves the
unlocked member, this branch nothing
- the same two symbols ungrouped: both move the unlocked one, as before
- user-placed wire text: master shifts it 190 px, this branch keeps it
ctest: 34/34.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When multiple elements are pasted or moved in one batch, each call to
autoBreakConductors() now receives the shared state from the previous
call. This prevents two elements in the same batch from independently
claiming the same conductor, which would result in a double-delete on
redo().
Requested by ispyisail in PR review.
For conductors, the setPos() function can result in negative
coordinates.
For unknown reasons, this can lead to an offset in the scene coordinate
system, resulting in a free space above and to the left of the drawing
frame. This free space could not be removed.
It is better to set the conductors using the conductor::updatePath()
function. If the conductor text has been moved by the user, the new
position of the text must be calculated.
It is important to position the elements first and then 'connect' the
conductors.
Setting the conductor position via setPos() was done in elemntsmover.cpp
(corrected here) and in Diagram::fromXML (corrected in the commit
'Better handling of conductors when creating from XML').
* terminal_strip:
Terminal strip item can saved / loaded to .qet file
See previous commit...
Move terminal strip drawer class in is own file
Fix wrong use of QStringLiteral and QLatin1String
Double click a TerminalStripItem open the editor
Minor change about checkable QAction of QetDiagramEditor
Minor : corrects a minor aesthetic defect when unbridge terminals
Revamp code
Add and move terminal strip item are now managed by undo command
TerminalStripItem : Draw terminal bridge
Terminal strip item can be added to diagram
Minor : add QGIUtility namespace
-Move MoveElementsCommand class from diagramcommands file to
movegraphicsitemcommand file.
-Rename the to class MoveGraphicsItemCommand.
-Minor code change to make it more modern.
Dynamic element text item editor : Add new entry for edit the alignment, rotation and vertical adjustment of a group
Element Mover : Minor, remove the group texts from the moved content
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5165 bfdf4180-ca20-0410-9c96-a3a8aa849046
The keybord shortcut for texts group alignment change. Now it's ctrl + arrow-left/up/right
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5141 bfdf4180-ca20-0410-9c96-a3a8aa849046