Commit 36bd08a4 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

geometry: Fix delcommand undo order.

Showing with 5 additions and 6 deletions
+5 -6
......@@ -58,15 +58,14 @@ class DelCommand(QUndoCommand):
self._reach = reach
self._rows = rows
self._profile = []
self._profiles = []
for row in rows:
self._profile.append(self._reach.profile(row))
self._profile.reverse()
self._profiles.append((row, self._reach.profile(row)))
self._profiles.sort()
def undo(self):
row = self._rows[0]
for pro in self._profile:
self._reach.insert_profile(row, pro)
for row, profile in self._profiles:
self._reach.insert_profile(row, profile)
def redo(self):
self._reach.delete(self._rows)
......
Supports Markdown
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