[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allows users to prevent rests from automatically shifting. (issue4385053
From: |
mtsolo |
Subject: |
Allows users to prevent rests from automatically shifting. (issue4385053) |
Date: |
Sun, 10 Apr 2011 11:12:52 +0000 |
Reviewers: ,
Message:
Potential fix for issue 1604.
Description:
Allows users to prevent rests from automatically shifting.
Please review this at http://codereview.appspot.com/4385053/
Affected files:
M lily/multi-measure-rest.cc
M scm/define-grob-properties.scm
M scm/define-grobs.scm
Index: lily/multi-measure-rest.cc
diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc
index
9628402a5ecec1ce899d4ef1d4ea57002b7529af..03b3afb646843c6b6ddd25501fa9f16b882084c3
100644
--- a/lily/multi-measure-rest.cc
+++ b/lily/multi-measure-rest.cc
@@ -1,4 +1,4 @@
-/*
+ /*
This file is part of LilyPond, the GNU music typesetter.
Copyright (C) 1998--2011 Jan Nieuwenhuizen <address@hidden>
@@ -156,11 +156,8 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real
space)
{
Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, "",
true));
- /*
- ugh.
- */
- if (Staff_symbol_referencer::get_position (me) == 0.0)
- s.translate_axis (staff_space, Y_AXIS);
+ if ((Staff_symbol_referencer::get_position (me) == 0.0) &&
to_boolean (me->get_property ("automatic-shift")))
+ s.translate_axis (staff_space, Y_AXIS);
s.translate_axis ((space - s.extent (X_AXIS).length ()) / 2, X_AXIS);
@@ -362,6 +359,7 @@ ADD_INTERFACE (Multi_measure_rest,
"A rest that spans a whole number of measures.",
/* properties */
+ "automatic-shift "
"bound-padding "
"expand-limit "
"hair-thickness "
Index: scm/define-grob-properties.scm
diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm
index
3381cb9e27ed2858ea1decc3e88b31e4c1d5b97f..abc09dfb5d93f3a5a4ae717bc24322461c8f914d
100644
--- a/scm/define-grob-properties.scm
+++ b/scm/define-grob-properties.scm
@@ -58,6 +58,7 @@ arpeggio squiggly line.")
(auto-knee-gap ,ly:dimension? "If a gap is found between note
heads where a horizontal beam fits that is larger than this number,
make a kneed beam.")
+ (automatic-shift ,boolean? "Should a rest be automatically shifted?")
(average-spacing-wishes ,boolean? "If set, the spacing wishes are
averaged over staves.")
(avoid-note-head ,boolean? "If set, the stem of a chord does not
Index: scm/define-grobs.scm
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index
84c3f72f8fbb72c715ebab652bd81c2780b31998..a47778458b751203f6f0aca4a37931909f5f4d39
100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -1301,6 +1301,7 @@
(MultiMeasureRest
. (
+ (automatic-shift . #t)
(expand-limit . 10)
(hair-thickness . 2.0)
(padding . 1)
@@ -1541,6 +1542,7 @@
(PercentRepeat
. (
+ (automatic-shift . #t)
(dot-negative-kern . 0.75)
(font-encoding . fetaMusic)
(slope . 1.0)
- Allows users to prevent rests from automatically shifting. (issue4385053),
mtsolo <=