Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2001--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2001--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 } | 42 } |
43 | 43 |
44 void | 44 void |
45 Bar_check_iterator::process (Moment m) | 45 Bar_check_iterator::process (Moment m) |
46 { | 46 { |
47 Simple_music_iterator::process (m); | 47 Simple_music_iterator::process (m); |
48 if (!m.to_bool ()) | 48 if (!m.to_bool ()) |
49 { | 49 { |
50 Context *tr = get_outlet (); | 50 Context *tr = get_outlet (); |
51 | 51 |
52 SCM check = tr->get_property ("ignoreBarChecks"); | 52 if (scm_is_true (tr->get_property ("ignoreBarChecks"))) |
dak
2011/08/18 15:46:44
As I already explained: you can't replace to_boole
| |
53 if (to_boolean (check)) | |
54 return; | 53 return; |
55 | 54 |
56 SCM mp = tr->get_property ("measurePosition"); | 55 SCM mp = tr->get_property ("measurePosition"); |
57 SCM sync = tr->get_property ("barCheckSynchronize"); | |
58 | 56 |
59 Moment *where = unsmob_moment (mp); | 57 Moment *where = unsmob_moment (mp); |
60 if (!where) | 58 if (!where) |
61 return; | 59 return; |
62 | 60 |
63 if (where->main_part_) | 61 if (where->main_part_) |
64 { | 62 { |
65 bool warn = true; | 63 bool warn = true; |
66 if (to_boolean (sync)) | 64 if (scm_is_true (tr->get_property ("barCheckSynchronize"))) |
dak
2011/08/18 15:46:44
Again, scm_is_true is wrong here.
| |
67 { | 65 { |
68 SCM mp; | 66 SCM mp; |
69 tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp); | 67 tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp); |
70 Moment zero; | 68 Moment zero; |
71 tr->set_property ("measurePosition", zero.smobbed_copy ()); | 69 tr->set_property ("measurePosition", zero.smobbed_copy ()); |
72 } | 70 } |
73 else | 71 else |
74 { | 72 { |
75 SCM lf = tr->get_property ("barCheckLastFail"); | 73 SCM lf = tr->get_property ("barCheckLastFail"); |
76 if (unsmob_moment (lf) | 74 if (unsmob_moment (lf) |
77 && *unsmob_moment (lf) == *where) | 75 && *unsmob_moment (lf) == *where) |
78 warn = false; | 76 warn = false; |
79 else | 77 else |
80 tr->set_property ("barCheckLastFail", mp); | 78 tr->set_property ("barCheckLastFail", mp); |
81 } | 79 } |
82 | 80 |
83 if (warn) | 81 if (warn) |
84 get_music ()->origin ()->warning (_f ("barcheck failed at: %s", | 82 get_music ()->origin ()->warning (_f ("barcheck failed at: %s", |
85 where->to_string ())); | 83 where->to_string ())); |
86 } | 84 } |
87 } | 85 } |
88 } | 86 } |
OLD | NEW |