From 664af39979aa80db2da40f68643742e4e218d5dd Mon Sep 17 00:00:00 2001 From: Nils Gey Date: Sat, 12 Feb 2011 21:46:49 +0100 Subject: Fall back to intial value if user cancels GetUserInput for NOTATIONSTRING or ASCIISTRING --- actions/notationmagick.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/actions/notationmagick.scm b/actions/notationmagick.scm index e9257927..730c02b9 100644 --- a/actions/notationmagick.scm +++ b/actions/notationmagick.scm @@ -10,12 +10,14 @@ ;; Ask for a new NOTATIONSTRING with an input-window, remember the value and return it as list of symbols for ANS (define (NotationMagick::AskNewNotationstring) (define new (d-GetUserInput "Enter Lilypond notes" "Please insert a list of lilypond notes, separated by Space." NotationMagick::NOTATIONSTRING)) - (set! NotationMagick::NOTATIONSTRING new) + (if new + (set! NotationMagick::NOTATIONSTRING new)) (map string->symbol (string-tokenize NotationMagick::NOTATIONSTRING))) (define (NotationMagick::AskNewAsciistring) (define new (d-GetUserInput "Enter ASCII chars" "Please insert any kind and number of ASCII chars " NotationMagick::ASCIISTRING)) - (set! NotationMagick::ASCIISTRING new) + (if new + (set! NotationMagick::ASCIISTRING new)) NotationMagick::ASCIISTRING) -- cgit v1.2.3