fix(trim): assign handle to trimmed polyline so it can be trimmed again (#65)
TrimCommand::on_entity_replaced never matched LwPolyline, so a trimmed (closed or open) polyline kept a NULL handle in the command's entity snapshot. A second pick on the same polyline then found nothing, so it could not be trimmed more than once without restarting the command. ExtendCommand already handled this case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
57d3e620ea
commit
ae86ad7582
1 changed files with 5 additions and 0 deletions
|
|
@ -2158,6 +2158,11 @@ impl CadCommand for TrimCommand {
|
|||
EntityType::XLine(x) => x.common.handle = h,
|
||||
EntityType::Ellipse(e) => e.common.handle = h,
|
||||
EntityType::Spline(s) => s.common.handle = h,
|
||||
// A trimmed (closed or open) polyline is re-emitted as an
|
||||
// LwPolyline; without its real handle it can't be found on a
|
||||
// second pick, so the same polyline couldn't be trimmed twice
|
||||
// in one TRIM command.
|
||||
EntityType::LwPolyline(p) => p.common.handle = h,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue