Skip to content

Commit

Permalink
Issue #91: [Epic] Undo states and object updates:
Browse files Browse the repository at this point in the history
- QuickFix: Revert back to current active .changed() flag set. Undo not working if all contours on all layers get .changed() flag?
  • Loading branch information
kateliev committed Mar 27, 2024
1 parent 6ab6803 commit 23745a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Lib/typerig/proxy/fl/objects/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 23745a0

Please sign in to comment.