Trim for dashed lines issue

Hi,
please, fix this issue when trimming dashed lines.
Thanks