From 7db48458b2391255b87ed9fb597ce6ff2391eb7a Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Mon, 6 Oct 2008 22:45:45 +0200 Subject: [PATCH] Fix the no note and text in metronome marks; also add regtest --- input/regression/metronome-text.ly | 2 ++ scm/translation-functions.scm | 13 ++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/input/regression/metronome-text.ly b/input/regression/metronome-text.ly index ec771c57ba..8282dbcc3c 100644 --- a/input/regression/metronome-text.ly +++ b/input/regression/metronome-text.ly @@ -23,6 +23,8 @@ Score.hideTempoNote, one can hide the duration=count in the tempo mark. \set Score.tempoHideNote = ##t \tempo "No note" 8=160 c1 \tempo "Still not" c1 + % No text and also no note => \null markup + \tempo 4=100 c1 \tempo "Allegro" 4=120 c1 \set Score.tempoHideNote = ##f \tempo "With note" 8=80 c1\break diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 2e4b8a6304..3767a18be2 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -21,25 +21,20 @@ (make-simple-markup "=") (make-simple-markup " ") (make-simple-markup (number->string count)))) - (make-null-markup))) + #f)) (text-markup (if (not (null? text)) (make-bold-markup text) #f))) (if text-markup - (if note-markup + (if (and note-markup (not hide-note)) (make-line-markup (list text-markup (make-concat-markup (list (make-simple-markup "(") note-markup (make-simple-markup ")"))))) - (make-line-markup (list text-markup)) - ) + (make-line-markup (list text-markup))) (if note-markup (make-line-markup (list note-markup)) - #f - ) - ) - ) -) + (make-null-markup))))) (define-public (format-mark-alphabet mark context) (make-bold-markup (make-markalphabet-markup (1- mark)))) -- 2.39.2