From b479e7ddbb6e28db9fb5e2adc06dcec58db0b160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 24 Sep 2019 17:45:18 +0200 Subject: [PATCH] Remove cursor before {re,un}doing to prevent artifacts. assets/text/TODO: updated. --- assets/text/TODO | 9 ++++----- libroar/RoarCanvasCommandsEdit.py | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/text/TODO b/assets/text/TODO index 43e04cc..d9b71a7 100644 --- a/assets/text/TODO +++ b/assets/text/TODO @@ -18,10 +18,9 @@ Release roadmap: 1) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object} -2) BUG: a) apply tool b) move cursor c) undo d) cursor artifacts -3) operators: crop, scale, shift, slice -4) auto{load,save} & {backup,restore} -5) tools: unicode block elements -6) floating/dockable toolbar +2) operators: crop, scale, shift, slice +3) auto{load,save} & {backup,restore} +4) tools: unicode block elements +5) floating/dockable toolbar vim:ff=dos tw=0 diff --git a/libroar/RoarCanvasCommandsEdit.py b/libroar/RoarCanvasCommandsEdit.py index 5418618..f634f33 100644 --- a/libroar/RoarCanvasCommandsEdit.py +++ b/libroar/RoarCanvasCommandsEdit.py @@ -194,11 +194,15 @@ class RoarCanvasCommandsEdit(): @GuiCommandDecorator("Redo", "&Redo", ["", wx.ART_REDO], [wx.ACCEL_CTRL, ord("Y")], False) def canvasRedo(self, event): + eventDc = self.parentCanvas.backend.getDeviceContext(self.parentCanvas.GetClientSize(), self.parentCanvas, self.parentCanvas.GetViewStart()) + self.parentCanvas.backend.drawCursorMaskWithJournal(self.parentCanvas.canvas, self.parentCanvas.canvas.journal, eventDc) self.parentCanvas.dispatchDeltaPatches(self.parentCanvas.canvas.journal.popRedo()) self.update(size=self.parentCanvas.canvas.size, undoLevel=self.parentCanvas.canvas.journal.patchesUndoLevel) @GuiCommandDecorator("Undo", "&Undo", ["", wx.ART_UNDO], [wx.ACCEL_CTRL, ord("Z")], False) def canvasUndo(self, event): + eventDc = self.parentCanvas.backend.getDeviceContext(self.parentCanvas.GetClientSize(), self.parentCanvas, self.parentCanvas.GetViewStart()) + self.parentCanvas.backend.drawCursorMaskWithJournal(self.parentCanvas.canvas, self.parentCanvas.canvas.journal, eventDc) self.parentCanvas.dispatchDeltaPatches(self.parentCanvas.canvas.journal.popUndo()) self.update(size=self.parentCanvas.canvas.size, undoLevel=self.parentCanvas.canvas.journal.patchesUndoLevel)