adjust check to only insist that, when there is an editor, is it the right kind of editor.
original commit: 465d5a9f758c7b87b9e621a0ebbedefddb746176
This commit is contained in:
parent
e696606631
commit
b22d6ba314
|
@ -152,11 +152,12 @@
|
|||
(set-max-height snip-height))))))))))
|
||||
(define/public (recalc-snips)
|
||||
(let ([editor (get-editor)])
|
||||
(unless (is-a? editor text:wide-snip<%>)
|
||||
(error 'recalc-snips "expected a text:wide-snip<%> editor, instead ~e" editor))
|
||||
(when (eq? (send editor get-canvas) this)
|
||||
(for-each (update-snip-size #t) (send editor get-wide-snips))
|
||||
(for-each (update-snip-size #f) (send editor get-tall-snips)))))
|
||||
(when editor
|
||||
(unless (is-a? editor text:wide-snip<%>)
|
||||
(error 'recalc-snips "expected a text:wide-snip<%> editor, instead ~e" editor))
|
||||
(when (eq? (send editor get-canvas) this)
|
||||
(for-each (update-snip-size #t) (send editor get-wide-snips))
|
||||
(for-each (update-snip-size #f) (send editor get-tall-snips))))))
|
||||
(define/public (add-wide-snip snip)
|
||||
(let ([editor (get-editor)])
|
||||
(unless (is-a? editor text:wide-snip<%>)
|
||||
|
|
Loading…
Reference in New Issue
Block a user