move shift/scale to container; closes #102

This commit is contained in:
Dominik Demuth
2023-07-24 17:38:55 +02:00
parent 13e6112c99
commit becc1a15a9
2 changed files with 12 additions and 5 deletions

View File

@ -841,13 +841,10 @@ class UpperManagement(QtCore.QObject):
d_k = self.data[k]
if copy_data is None:
d_k.x = d_k.x*v[1][0] + v[0][0]
d_k.y = d_k.y*v[1][1] + v[0][1]
d_k.shift_scale(v[0], v[1])
else:
new_data = d_k.copy(full=True)
new_data.update({'shift': v[0], 'scale': v[1]})
new_data.data.x = new_data.x*v[1][0] + v[0][0]
new_data.y = new_data.y*v[1][1] + v[0][1]
new_data.shift_scale(v[0], v[1])
sid = self.add(new_data)
sid_list.append(sid)