AdisTT: short correction on paste function in edit windows for WeatherParam

dev_dylan
Dylan Jeannin 2026-07-17 17:47:33 +02:00
parent bc87d6add1
commit 6d58c09104
1 changed files with 6 additions and 4 deletions

View File

@ -139,15 +139,17 @@ class PasteCommand(QUndoCommand):
self._data = data self._data = data
self._row = row self._row = row
self._wps = wps self._wps = list(wps)
self._wps.reverse() self._wps.reverse()
def undo(self): def undo(self):
self._data.delete(self._wps) self._data.delete_i(
range(self._row, self._row + len(self._wps))
)
def redo(self): def redo(self):
for bc in self._wps: for wp in self._wps:
self._data.insert(self._row, bc) self._data.insert(self._row, wp)
class DuplicateCommand(QUndoCommand): class DuplicateCommand(QUndoCommand):