drawing: make not having infringables the default when adding canes

The previous commit only did it for inserted canes.
This commit is contained in:
Mikolaj Wielgus 2024-07-09 18:56:34 +02:00
parent 1c07eb96ac
commit 3fd31746af
1 changed files with 10 additions and 3 deletions

View File

@ -398,8 +398,15 @@ impl<CW: Copy, R: AccessRules> Drawing<CW, R> {
cw: bool, cw: bool,
) -> Result<Cane, LayoutException> { ) -> Result<Cane, LayoutException> {
let maybe_wraparound = self.wraparoundable(around).wraparound(); let maybe_wraparound = self.wraparoundable(around).wraparound();
let cane = self.add_cane_with_infringables(
let cane = self.add_cane(from, around, dot_weight, seg_weight, bend_weight, cw)?; from,
around,
dot_weight,
seg_weight,
bend_weight,
cw,
Some(&[]),
)?;
if let Some(wraparound) = maybe_wraparound { if let Some(wraparound) = maybe_wraparound {
self.reattach_bend(wraparound, Some(cane.bend)); self.reattach_bend(wraparound, Some(cane.bend));
@ -549,7 +556,7 @@ impl<CW: Copy, R: AccessRules> Drawing<CW, R> {
seg_weight, seg_weight,
bend_weight, bend_weight,
cw, cw,
Some(&self.collect().wraparounded_bows(around)), Some(&[]),
) )
} }