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:
blacksun
2014-06-27 18:34:18 +00:00
parent 76371b8740
commit 8379163061
12 changed files with 139 additions and 77 deletions

View File

@@ -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);
}
/**