mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug
This commit is contained in:
1 parent
6f7a891a6d
commit
d8c2634a66
4 files changed
+26
-1
No files matched your search
@@ -444,6 +444,7 @@ class Plot(PamhyrPlot):
|
||||
|
||||
@timer
|
||||
def update(self):
|
||||
self.draw()
|
||||
self.draw_highligth()
|
||||
|
||||
self.update_idle()
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user