- Item *it = dynamic_cast<Item*> (me) ;
- if (it->break_status_dir () != RIGHT)
- {
- SCM old = me->get_property ("old-accidentals");
-
- /*
- Add half a space between cancellation and key sig.
-
- As suggested by [Ross], p.148.
- */
- Interval x (0, inter);
- Interval y (0,0);
-
- mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)), 0, 0);
-
- Stencil natural;
- if (ly_c_pair_p (old))
- natural=Font_interface::get_default_font (me)->
- find_by_name (String ("accidentals-") + style + String ("0"));
-
- for (; ly_c_pair_p (old); old = ly_cdr (old))
- {
- SCM found = scm_assoc (ly_caar (old), newas);
- if (found == SCM_BOOL_F
- || ly_cdr (found) != ly_cdar (old))
- {
- SCM what = ly_caar (old);
- int alteration = 0;
- int pos = alteration_pos (what, alteration, c0p);
-
- Stencil m = natural;
- m.translate_axis (pos* inter, Y_AXIS);
-
- /*
- The natural sign (unlike flat & sharp)
- has vertical edges on both sides. A little padding is
- needed to prevent collisions.
- */
- Real padding = 0.1 ;
- mol.add_at_edge (X_AXIS, LEFT, m, padding, 0);
- }
- }
+ /*
+ The natural sign (unlike flat & sharp)
+ has vertical edges on both sides. A little padding is
+ needed to prevent collisions.
+ */
+ Real padding = 0.0;
+ if (alteration == 0
+ && last_pos < pos + 2
+ && last_pos > pos - 6)
+ padding = 0.3;
+
+ mol.add_at_edge (X_AXIS, LEFT, acc, padding, 0);
+ last_pos = pos;
+ }