From 406d0774c90e9cb178e0cd9a1ebdf8f4e684f9b8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 8 Apr 2009 12:42:25 +0000 Subject: [PATCH] some pasteboard repairs svn: r14462 --- collects/mred/private/wxme/editor.ss | 6 +++--- collects/mred/private/wxme/pasteboard.ss | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/collects/mred/private/wxme/editor.ss b/collects/mred/private/wxme/editor.ss index 6e191f869d..6e4b784292 100644 --- a/collects/mred/private/wxme/editor.ss +++ b/collects/mred/private/wxme/editor.ss @@ -1109,10 +1109,10 @@ (let loop ([s (send this find-first-snip)]) (if s (if (send this is-selected? s) + (loop (snip->next s)) (begin (send this add-selected s) - (cons s (loop (snip->next s)))) - (loop (snip->next s))) + (cons s (loop (snip->next s))))) null))]) (send this copy #t 0) (for-each (lambda (s) @@ -1134,7 +1134,7 @@ (for-each (lambda (s bfd) (unless (this . is-a? . text%) - (send m insert s s)) ;; before itself -> at end + (send m insert s #f)) (when bfd (send m set-snip-data s bfd))) copy-snips diff --git a/collects/mred/private/wxme/pasteboard.ss b/collects/mred/private/wxme/pasteboard.ss index 98366e7d0c..30eff3792c 100644 --- a/collects/mred/private/wxme/pasteboard.ss +++ b/collects/mred/private/wxme/pasteboard.ss @@ -1637,23 +1637,23 @@ ;; ---------------------------------------- - (def/override (set-min-width [real? w]) - (set! min-width (if (w . <= . 0) 'none w)) + (def/override (set-min-width [(make-alts real? (symbol-in none)) w]) + (set! min-width (if (and (real? w) (w . <= . 0)) 'none w)) (set! need-resize? #t) (update-all)) - (def/override (set-max-width [real? w]) - (set! max-width (if (w . <= . 0) 'none w)) + (def/override (set-max-width [(make-alts real? (symbol-in none)) w]) + (set! max-width (if (and (real? w) (w . <= . 0)) 'none w)) (set! need-resize? #t) (update-all)) - (def/override (set-min-height [real? h]) - (set! min-height (if (h . <= . 0) 'none h)) + (def/override (set-min-height [(make-alts real? (symbol-in none)) h]) + (set! min-height (if (and (real? h) (h . <= . 0)) 'none h)) (set! need-resize? #t) (update-all)) - (def/override (set-max-height [real? h]) - (set! max-height (if (h . <= . 0) 'none h)) + (def/override (set-max-height [(make-alts real? (symbol-in none)) h]) + (set! max-height (if (and (real? h) (h . <= . 0)) 'none h)) (set! need-resize? #t) (update-all))