                 animState = "fade"
                 fadeCount = 0
             }
-            scene.nextStep()
+            else
+            {
+                scene.nextStep()
+            }
         }
-        
-        context?.flushGraphics()
+    }
+
+    override public func animateOneFrame() {
+        needsDisplay = true
     }
     
     /*

        draw(bounds)
    }
    
    override func draw(_ rect: NSRect)
    {
        let bPath:NSBezierPath = NSBezierPath(rect: rect)
        bPath.fill()
    }
    override var configureSheet: NSWindow? { return sheetController.window }
    override var hasConfigureSheet: Bool { return true }
    func width() -> Int { return Int(bounds.size.width) }
    func height() -> Int { return Int(bounds.size.height) }
}

        scene.setup(self.isPreview, width: self.width(), height: self.height())
        super.startAnimation()
        animationTimeInterval = 1.0 / scene.fps
        self.window?.backingType = .nonretained // an attempt to stop the double-buffering, which doesn't work
    }
        
    override public func draw(_ rect: NSRect) {
        if animState == "fade"
        {
            fadeOut()
