mirror of https://gitlab.com/pamhyr/pamhyr2
AdisTT: short correction on paste function in edit windows for WeatherParam
parent
bc87d6add1
commit
6d58c09104
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue