Improve signal of position changed, between linked elements

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3394 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-10-23 08:48:30 +00:00
parent 2a4d013994
commit e3cc8d449d
6 changed files with 24 additions and 20 deletions

View File

@@ -29,8 +29,7 @@ QetGraphicsItem::QetGraphicsItem(QGraphicsItem *parent):
is_movable_(true),
first_move_(true),
snap_to_grid_(true)
{
}
{}
QetGraphicsItem::~QetGraphicsItem()
{}
@@ -53,7 +52,6 @@ void QetGraphicsItem::setPos(const QPointF &p) {
if (pp == pos() || !is_movable_) return;
if (scene() && snap_to_grid_) {
QGraphicsItem::setPos(pp);
emit positionChange(pos());
} else QGraphicsItem::setPos(pp);
}