mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-05 20:20:52 +01:00
Fixed behaviour when moving conductor/independent text items.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1654 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -142,8 +142,11 @@ void ConductorTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *e) {
|
||||
if (textInteractionFlags() & Qt::TextEditable) {
|
||||
QGraphicsTextItem::mouseMoveEvent(e);
|
||||
} else if ((flags() & QGraphicsItem::ItemIsMovable) && (e -> buttons() & Qt::LeftButton)) {
|
||||
QPointF intended_pos = mapToParent(e -> pos()) - matrix().map(e -> buttonDownPos(Qt::LeftButton));
|
||||
if (first_move_) {
|
||||
mouse_to_origin_movement_ = before_mov_pos_ - mapToParent(e -> buttonDownPos(Qt::LeftButton));
|
||||
}
|
||||
|
||||
QPointF intended_pos = mapToParent(e -> pos()) + mouse_to_origin_movement_;
|
||||
// si ce texte est attache a un conducteur, alors ses mouvements seront
|
||||
// limites a une certaine distance du trace de ce conducteur
|
||||
if (parent_conductor_) {
|
||||
|
||||
Reference in New Issue
Block a user