mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-19 01:19:59 +01:00
Xref item: item position can be set under the texte field "label" of master element.
Double clic in xref open the properties dialog of master. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3183 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -48,11 +48,12 @@ Diagram* QetGraphicsItem::diagram() const{
|
||||
* @param p the new position of item
|
||||
*/
|
||||
void QetGraphicsItem::setPos(const QPointF &p) {
|
||||
if (p == pos() || !is_movable_) return;
|
||||
QPointF pp = Diagram::snapToGrid(p);
|
||||
if (pp == pos() || !is_movable_) return;
|
||||
if (scene() && snap_to_grid_) {
|
||||
QGraphicsItem::setPos(Diagram::snapToGrid(p));
|
||||
QGraphicsItem::setPos(pp);
|
||||
emit positionChange(pos());
|
||||
} else QGraphicsItem::setPos(p);
|
||||
} else QGraphicsItem::setPos(pp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user