mirror of https://gitlab.com/pamhyr/pamhyr2
parent
b20a4c3c3d
commit
c065b19ef8
|
|
@ -1101,11 +1101,9 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
p = ProfileXYZ(id=self.id,
|
p = ProfileXYZ(name=self.name,
|
||||||
name=self.name,
|
|
||||||
rk=self.rk,
|
rk=self.rk,
|
||||||
reach=self.reach,
|
reach=self.reach,
|
||||||
num=self.num,
|
|
||||||
status=self._status)
|
status=self._status)
|
||||||
for i, k in enumerate(self.points):
|
for i, k in enumerate(self.points):
|
||||||
p.insert_point(i, k.copy())
|
p.insert_point(i, k.copy())
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,9 @@ class Reach(SQLSubModel):
|
||||||
"""
|
"""
|
||||||
if profile in self._profiles:
|
if profile in self._profiles:
|
||||||
self.undelete([profile])
|
self.undelete([profile])
|
||||||
|
profile.num = index
|
||||||
else:
|
else:
|
||||||
|
profile.num = index
|
||||||
self._profiles.insert(index, profile)
|
self._profiles.insert(index, profile)
|
||||||
|
|
||||||
self.modified()
|
self.modified()
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,7 @@ class MeshingCommand(QUndoCommand):
|
||||||
for i in range(self._limites[1] - self._limites[0]):
|
for i in range(self._limites[1] - self._limites[0]):
|
||||||
k += 1
|
k += 1
|
||||||
for p in self._new_profiles[i]:
|
for p in self._new_profiles[i]:
|
||||||
self._reach.insert_profile(k, p.cloned_for(self._reach))
|
self._reach.insert_profile(k, p)
|
||||||
k += 1
|
k += 1
|
||||||
|
|
||||||
# Update selection
|
# Update selection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue