Index: gui.lisp
===================================================================
RCS file: /project/gsharp/cvsroot/gsharp/gui.lisp,v
retrieving revision 1.59
diff -u -r1.59 gui.lisp
--- gui.lisp	2 Mar 2006 09:29:44 -0000	1.59
+++ gui.lisp	12 May 2006 16:44:03 -0000
@@ -167,7 +167,18 @@
     (score-pane:with-score-pane pane
       (draw-buffer pane buffer (current-cursor)
 		   (left-margin buffer) 100)
-      (gsharp-drawing::draw-the-cursor pane (current-cursor) (cursor-element (current-cursor)) (last-note (input-state *application-frame*))))))
+      (gsharp-drawing::draw-the-cursor pane (current-cursor) (cursor-element (current-cursor)) (last-note (input-state *application-frame*)))
+      (multiple-value-bind (minx miny maxx maxy)
+          (bounding-rectangle* pane)
+        (declare (ignore minx maxx))
+        (change-space-requirements pane :height (- maxy miny))))))
+
+(defmethod window-clear ((pane score-pane:score-pane))
+  (let ((output-history (stream-output-history pane)))
+    (with-bounding-rectangle* (left top right bottom) output-history
+      (medium-clear-area (sheet-medium pane) left top right bottom))
+    (clear-output-record output-history))
+  (window-erase-viewport pane))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
