def undoImageMod_Parallel(menuitem, image): global _rank if _rank == 0: return # The back-end processes who = oofimage.imageContexts[image] who.begin_writing() oofimage.undoModification(image) who.end_writing()
def undoImageMod(menuitem, image): if parallel_enable.enabled(): from ooflib.image.IO import oofimageIPC oofimageIPC.imenu.Undo(image=image) who = imagecontext.imageContexts[image] who.begin_writing() oofimage.undoModification(image) who.end_writing() switchboard.notify('modified image', None, image) switchboard.notify('redraw')