From 23745a0da75558aff7390f06d4ac70ce262e6857 Mon Sep 17 00:00:00 2001 From: Vassil Kateliev Date: Wed, 27 Mar 2024 17:18:16 +0200 Subject: [PATCH] Issue #91: [Epic] Undo states and object updates: - QuickFix: Revert back to current active .changed() flag set. Undo not working if all contours on all layers get .changed() flag? --- Lib/typerig/proxy/fl/objects/glyph.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/typerig/proxy/fl/objects/glyph.py b/Lib/typerig/proxy/fl/objects/glyph.py index f209958..2c37f51 100644 --- a/Lib/typerig/proxy/fl/objects/glyph.py +++ b/Lib/typerig/proxy/fl/objects/glyph.py @@ -32,7 +32,7 @@ from typerig.proxy.fl.objects.string import diactiricalMarks # - Init ------------------------------------------- -__version__ = '0.31.5' +__version__ = '0.31.6' # - Keep compatibility for basestring checks try: @@ -748,7 +748,7 @@ def reportLayerComp(self, strong=False): return [(layerA.name, layerB.name, layerA.isCompatible(layerB, strong)) for layerA, layerB in combinations(self.layers(), 2)] # - Update ---------------------------------------------- - def update(self, layer): + def update(self, layer=None): '''Updates the glyph and sends notification to the editor. ''' for contour in self.contours(layer): contour.changed() @@ -759,9 +759,12 @@ def updateObject(self, flObject, undoMessage='TypeRig', verbose=True): flObject (flGlyph, flLayer, flShape, flNode, flContour): Object to be update and set undo state undoMessage (string): Message to be added in undo/history list.''' + ''' # !!! QuickFix: Issue #91 Undo... should be removed after all code is fixed for layer in self.masters(): self.update(layer.name) + ''' + self.update() # - General way ---- pre 6774 worked fine! fl6.flItems.notifyChangesApplied(undoMessage[:20], flObject, True)