terraz_dev
Theophile Terraz 2025-01-22 09:13:13 +01:00
parent 6f7a891a6d
commit d8c2634a66
4 changed files with 26 additions and 1 deletions

View File

@ -410,7 +410,7 @@ class MeshingWithMageMailleurTT(AMeshingTool):
str,
[
st_file, m_file,
"update_rk", step,
"update_kp", step,
limites[0], limites[1],
directrices[0], directrices[1],
orientation, lm, linear, origin, origin_value

View File

@ -879,3 +879,7 @@ class ProfileXYZ(Profile, SQLSubModel):
p.x = p.x + x
p.y = p.y + y
p.z = p.z + z
def modified(self):
self.tab_up_to_date = False
self.station_up_to_date = False

View File

@ -444,6 +444,7 @@ class Plot(PamhyrPlot):
@timer
def update(self):
self.draw()
self.draw_highligth()
self.update_idle()

View File

@ -42,9 +42,11 @@ class SetXCommand(SetDataCommand):
def undo(self):
self._profile.point(self._index).x = self._old
self._profile.modified()
def redo(self):
self._profile.point(self._index).x = self._new
self._profile.modified()
class SetYCommand(SetDataCommand):
@ -54,9 +56,11 @@ class SetYCommand(SetDataCommand):
def undo(self):
self._profile.point(self._index).y = self._old
self._profile.modified()
def redo(self):
self._profile.point(self._index).y = self._new
self._profile.modified()
class SetZCommand(SetDataCommand):
@ -66,9 +70,11 @@ class SetZCommand(SetDataCommand):
def undo(self):
self._profile.point(self._index).z = self._old
self._profile.modified()
def redo(self):
self._profile.point(self._index).z = self._new
self._profile.modified()
class SetNameCommand(SetDataCommand):
@ -94,12 +100,14 @@ class AddCommand(QUndoCommand):
def undo(self):
self._profile.delete_i([self._index])
self._profile.modified()
def redo(self):
if self._point is None:
self._point = self._profile.insert(self._index)
else:
self._profile.insert_point(self._index, self._point)
self._profile.modified()
class DelCommand(QUndoCommand):
@ -117,9 +125,11 @@ class DelCommand(QUndoCommand):
def undo(self):
for row, point in self._points:
self._profile.insert_point(row, point)
self._profile.modified()
def redo(self):
self._profile.delete_i(self._rows)
self._profile.modified()
class SortCommand(QUndoCommand):
@ -143,9 +153,11 @@ class SortCommand(QUndoCommand):
def undo(self):
self._profile.sort_with_indexes(self._indexes)
self._profile.modified()
def redo(self):
self._profile.sort(self._column, self._reverse)
self._profile.modified()
class MoveCommand(QUndoCommand):
@ -161,12 +173,14 @@ class MoveCommand(QUndoCommand):
self._profile.move_up_point(self._i)
else:
self._profile.move_down_point(self._i)
self._profile.modified()
def redo(self):
if self._up:
self._profile.move_up_point(self._i)
else:
self._profile.move_down_point(self._i)
self._profile.modified()
class ReverseCommand(QUndoCommand):
@ -177,9 +191,11 @@ class ReverseCommand(QUndoCommand):
def undo(self):
self._profile.reverse()
self._profile.modified()
def redo(self):
self._profile.reverse()
self._profile.modified()
class PurgeCommand(QUndoCommand):
@ -192,9 +208,11 @@ class PurgeCommand(QUndoCommand):
def undo(self):
self._profile._points = self._old.copy()
self._profile.modified()
def redo(self):
self._profile.purge(self._np_purge)
self._profile.modified()
class PasteCommand(QUndoCommand):
@ -210,7 +228,9 @@ class PasteCommand(QUndoCommand):
def undo(self):
for ind in range(len(self._points)):
self._profile.delete_i([self._row])
self._profile.modified()
def redo(self):
for point in self._points:
self._profile.insert_point(self._row, point)
self._profile.modified()