From 31b45d1076b9c7e71078c8ef290d0161a4efd801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 12 Sep 2019 16:39:17 +0200 Subject: [PATCH] libcanvas/CanvasJournal.py:end(): purge patchesUndo if at patchesUndoLevel > 0. assets/text/TODO: updated. --- assets/text/TODO | 7 +++---- libcanvas/CanvasJournal.py | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/text/TODO b/assets/text/TODO index 74f9ab4..5301720 100644 --- a/assets/text/TODO +++ b/assets/text/TODO @@ -13,9 +13,8 @@ High-priority list: 1) geometric primitives: arrow, circle, cloud/speech bubble, curve, heart, hexagon, line, pentagon, polygon, rhombus, triangle, square, star 2) region filters: crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate 3) text tool: a) allow navigating w/ cursor keys b) Unicode set key & GUI w/ MRU -4) fix outstanding {re,un}do bugs -5) GUI: {de,in}crease cell size -6) GUI: MRU {directories,files} -7) cleanup & refactor +4) GUI: {de,in}crease cell size +5) GUI: MRU {directories,files} +6) cleanup & refactor vim:ff=dos tw=0 diff --git a/libcanvas/CanvasJournal.py b/libcanvas/CanvasJournal.py index e76c140..76e63f3 100644 --- a/libcanvas/CanvasJournal.py +++ b/libcanvas/CanvasJournal.py @@ -13,6 +13,9 @@ class CanvasJournal(): def end(self): if self.patchesUndo[self.patchesUndoLevel] == [[], []]: del self.patchesUndo[self.patchesUndoLevel] + else: + if self.patchesUndoLevel > 0: + del self.patchesUndo[:self.patchesUndoLevel]; self.patchesUndoLevel = 0; # }}} # {{{ popCursor(self) def popCursor(self):