Commit c27c8ebf authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update symbol positionning

parent 62f7f1d2
......@@ -310,6 +310,7 @@ class Symbol(QObject, QGraphicsPathItem, object):
def update_position(self):
''' VIRTUAL - implemented in subclasses '''
pass
#self.position = self.position
def select(self, selected=True):
''' When item is selected, effectively select its grabber '''
......@@ -480,8 +481,8 @@ class Symbol(QObject, QGraphicsPathItem, object):
child.pos_x -= delta_x
child.pos_y -= delta_y
# X-pos must be updated when resizing,
# independently from update_position -->> XXX WHY ??
#self.setPos(pos.x() + delta_x, self.y())
# independently from update_position
self.pos_x += delta_x
if self.comment:
self.comment.pos_x -= delta_x
self.comment.pos_y += delta_y / 2.0
......@@ -1212,12 +1213,11 @@ class VerticalSymbol(Symbol, object):
LOG.debug('{} positionned at {}'.format(unicode(self),
unicode(self.scenePos())))
def update_position(self):
'''
Update the symbol position -
always below its parent (check collisions, etc.)
'''
pass # set_valid_pos does it all
# def update_position(self):
# '''
# Update the symbol position -
# always below its parent (check collisions, etc.)
# '''
# # 'or self.parent' because of pyside/qt bug
# parent = self.parentItem() or self.parent
# self.pos_x = -((self.boundingRect().width() -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment