forked from 1b-agent/opencadstudio-upstream
feat(plugin): add CommitMany and CommitManyAndEnd for multi-entity interactive commands
This commit is contained in:
1 parent
358103c1e4
commit
d218ec1451
3 files changed
+26
-3
No files matched your search
@@ -645,8 +645,12 @@ pub enum CommandStep {
|
||||
NeedPoint,
|
||||
/// Commit an entity to the document and keep collecting points.
|
||||
Commit(EntityType),
|
||||
/// Commit multiple entities to the document and keep collecting points.
|
||||
CommitMany(Vec<EntityType>),
|
||||
/// Commit an entity and end the command.
|
||||
CommitAndEnd(EntityType),
|
||||
/// Commit multiple entities to the document and end the command.
|
||||
CommitManyAndEnd(Vec<EntityType>),
|
||||
/// End the command without committing.
|
||||
Done,
|
||||
/// Cancel the command.
|
||||
|
||||
@@ -197,6 +197,7 @@ fn handle_host_request(
|
||||
CommandStep::Done
|
||||
| CommandStep::Cancel
|
||||
| CommandStep::CommitAndEnd(_)
|
||||
| CommandStep::CommitManyAndEnd(_)
|
||||
);
|
||||
(Ok(s), is_done)
|
||||
}
|
||||
@@ -335,6 +336,7 @@ fn handle_host_request_v4(
|
||||
CommandStep::Done
|
||||
| CommandStep::Cancel
|
||||
| CommandStep::CommitAndEnd(_)
|
||||
| CommandStep::CommitManyAndEnd(_)
|
||||
);
|
||||
(Ok(s), is_done)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user