forked from 1b-agent/opencadstudio-upstream
feat(select): offer the selection modes at "Select objects"
Only Previous and Last were on offer, so Window, Crossing, Fence, the two polygons and All could not be reached at all -- and with no keyboard to type them into, the buttons were the only way in. Window and Crossing fix the sense of the next box. Dragging derives that from the direction the corner travels and would overwrite it the moment the corner moved, so the derivation stands down while a keyword holds it. Add and Remove decide what a pick does for the rest of the round: Remove subtracts the way Shift already does, rather than through PICKADD, which decides whether a pick *replaces* the set and so would have wiped everything gathered so far. Both are dropped when the next command starts, since neither outlives the selection that asked for them. Fence and the polygons are picked point by point, which TRIM and EXTEND already ask for. That gesture -- the points, the rubber-banded dashed preview, whether the path closes -- moves into one place both bind to, and the two preview builders duplicated in trim.rs go with it. A fence is not the polygon test with crossing set: that closes the point list and counts whatever lies inside, so a line drawn past a row of objects would take everything behind it too. It gets a hit test that only counts a real intersection, and skips the area-based geometry entirely. The lasso gathered its hits from wires, hatches, block hatches, meshes and block meshes inline; the new modes need the same list, and a second copy would drift. Both now come through `Scene::path_hit_handles`. Closes #596 Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
22890a9411
commit
5c5c7606a1
12 files changed
+613
-151
No files matched your search
@@ -0,0 +1,116 @@
|
||||
// A path picked point by point, and the way it is drawn while it is being
|
||||
// picked.
|
||||
//
|
||||
// Two features ask the user for the same gesture. TRIM and EXTEND take a fence
|
||||
// through the drawing and cut whatever it crosses; the Fence / WPolygon /
|
||||
// CPolygon selection modes take one and select whatever it crosses or encloses.
|
||||
// Only what happens to the result differs, so the gesture itself — the points,
|
||||
// the rubber-banded dashed preview, and whether the path closes back on itself
|
||||
// — lives here and both bind to it.
|
||||
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
/// Dash rhythm shared by every in-progress selection gesture, so a fence being
|
||||
/// picked reads the same wherever it is offered.
|
||||
const DASH_LENGTH: f32 = 0.8;
|
||||
const DASH_PATTERN: [f32; 8] = [0.5, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];
|
||||
|
||||
/// The crossing-box green, matching the selection marquee the option imitates.
|
||||
const CROSSING_GREEN: [f32; 4] = [0.35, 0.85, 0.35, 0.9];
|
||||
|
||||
/// A path being picked one point at a time.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct FencePick {
|
||||
/// Points committed so far, in drawing coordinates.
|
||||
pub points: Vec<[f64; 2]>,
|
||||
/// Whether the path closes back to its first point. A polygon encloses an
|
||||
/// area and can be asked what lies inside it; an open fence only ever
|
||||
/// answers what it cuts.
|
||||
pub closed: bool,
|
||||
}
|
||||
|
||||
impl FencePick {
|
||||
/// An open fence: it selects what it crosses, and encloses nothing.
|
||||
pub fn fence() -> Self {
|
||||
Self {
|
||||
points: Vec::new(),
|
||||
closed: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// A closed polygon, which encloses an area as well as cutting through one.
|
||||
pub fn polygon() -> Self {
|
||||
Self {
|
||||
points: Vec::new(),
|
||||
closed: true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn push(&mut self, point: [f64; 2]) {
|
||||
self.points.push(point);
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.points.len()
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.points.is_empty()
|
||||
}
|
||||
|
||||
/// Enough points to mean anything: two for a fence to cut with, three for a
|
||||
/// polygon to enclose with.
|
||||
pub fn is_usable(&self) -> bool {
|
||||
self.points.len() >= if self.closed { 3 } else { 2 }
|
||||
}
|
||||
|
||||
/// The picked path, brought back to its first point when it is a polygon.
|
||||
pub fn path(&self) -> Vec<[f64; 2]> {
|
||||
let mut path = self.points.clone();
|
||||
if self.closed {
|
||||
if let Some(first) = self.points.first().copied() {
|
||||
path.push(first);
|
||||
}
|
||||
}
|
||||
path
|
||||
}
|
||||
|
||||
/// The path so far, trailing the cursor, dashed.
|
||||
pub fn preview(&self, cursor: [f64; 2], name: &str) -> WireModel {
|
||||
let mut path = self.points.clone();
|
||||
path.push(cursor);
|
||||
if self.closed {
|
||||
if let Some(first) = self.points.first().copied() {
|
||||
path.push(first);
|
||||
}
|
||||
}
|
||||
dashed(path, name, WireModel::CYAN)
|
||||
}
|
||||
}
|
||||
|
||||
/// Rubber-banded crossing rectangle, drawn like the selection marquee it stands
|
||||
/// in for so the option reads as the selection it performs. (#336)
|
||||
pub fn crossing_box_preview(corner: [f64; 2], cursor: [f64; 2], name: &str) -> WireModel {
|
||||
dashed(
|
||||
vec![
|
||||
corner,
|
||||
[corner[0], cursor[1]],
|
||||
cursor,
|
||||
[cursor[0], corner[1]],
|
||||
corner,
|
||||
],
|
||||
name,
|
||||
CROSSING_GREEN,
|
||||
)
|
||||
}
|
||||
|
||||
fn dashed(path: Vec<[f64; 2]>, name: &str, color: [f32; 4]) -> WireModel {
|
||||
let points: Vec<[f32; 3]> = path
|
||||
.into_iter()
|
||||
.map(|p| [p[0] as f32, p[1] as f32, 0.0])
|
||||
.collect();
|
||||
let mut wire = WireModel::solid(name.into(), points, color, false);
|
||||
wire.pattern_length = DASH_LENGTH;
|
||||
wire.pattern = DASH_PATTERN;
|
||||
wire
|
||||
}
|
||||
@@ -5,6 +5,7 @@ pub mod clipboard;
|
||||
pub mod defaults;
|
||||
mod donate;
|
||||
pub mod draw;
|
||||
pub mod fence;
|
||||
pub mod groups;
|
||||
pub mod inquiry;
|
||||
pub mod layers;
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
use std::f64::consts::TAU;
|
||||
|
||||
use crate::modules::draw::fence::{crossing_box_preview, FencePick};
|
||||
|
||||
use acadrust::entities::{
|
||||
Arc as ArcEnt, Circle as CircleEnt, Ellipse as EllipseEnt, Line as LineEnt, LwPolyline,
|
||||
LwVertex, Ray as RayEnt, Spline as SplineEnt, XLine as XLineEnt,
|
||||
@@ -2100,7 +2102,7 @@ enum TrimMode {
|
||||
/// Collecting cutting/boundary edges; Enter returns to Pick.
|
||||
SelectEdges,
|
||||
/// Collecting fence points; Enter runs the fence pass.
|
||||
Fence(Vec<[f64; 2]>),
|
||||
Fence(FencePick),
|
||||
/// Crossing: waiting for the first rectangle corner.
|
||||
CrossFirst,
|
||||
/// Crossing: first corner picked, waiting for the second.
|
||||
@@ -2983,32 +2985,6 @@ fn extend_hover_wires(
|
||||
out
|
||||
}
|
||||
|
||||
/// Fence preview polyline (committed points + rubber point), dashed.
|
||||
fn fence_preview_wire(pts: &[[f64; 2]], cursor: [f64; 2], name: &str) -> WireModel {
|
||||
let mut wire: Vec<[f32; 3]> = pts.iter().map(|p| [p[0] as f32, p[1] as f32, 0.0]).collect();
|
||||
wire.push([cursor[0] as f32, cursor[1] as f32, 0.0]);
|
||||
let mut w = WireModel::solid(name.into(), wire, WireModel::CYAN, false);
|
||||
w.pattern_length = 0.8;
|
||||
w.pattern = [0.5, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];
|
||||
w
|
||||
}
|
||||
|
||||
/// Crossing preview rectangle — the selection crossing-box look (dashed
|
||||
/// green outline) so the option reads like a crossing selection (#336).
|
||||
fn crossing_preview_wire(p1: [f64; 2], cursor: [f64; 2], name: &str) -> WireModel {
|
||||
let pts = vec![
|
||||
[p1[0] as f32, p1[1] as f32, 0.0],
|
||||
[p1[0] as f32, cursor[1] as f32, 0.0],
|
||||
[cursor[0] as f32, cursor[1] as f32, 0.0],
|
||||
[cursor[0] as f32, p1[1] as f32, 0.0],
|
||||
[p1[0] as f32, p1[1] as f32, 0.0],
|
||||
];
|
||||
let mut w = WireModel::solid(name.into(), pts, [0.35, 0.85, 0.35, 0.9], false);
|
||||
w.pattern_length = 0.8;
|
||||
w.pattern = [0.5, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];
|
||||
w
|
||||
}
|
||||
|
||||
pub struct TrimCommand {
|
||||
all_entities: Vec<EntityType>,
|
||||
entity_index: ModifyEntityIndex,
|
||||
@@ -3125,9 +3101,9 @@ impl CadCommand for TrimCommand {
|
||||
self.edge_set.len()
|
||||
)
|
||||
.into_owned(),
|
||||
TrimMode::Fence(pts) => crate::tf!(
|
||||
TrimMode::Fence(pick) => crate::tf!(
|
||||
"TRIM{edge} Fence: pick points [{} placed, Enter = trim crossed]:",
|
||||
pts.len()
|
||||
pick.len()
|
||||
)
|
||||
.into_owned(),
|
||||
TrimMode::CrossFirst => crate::tf!("TRIM{edge} Crossing: first corner:").into_owned(),
|
||||
@@ -3172,7 +3148,7 @@ impl CadCommand for TrimCommand {
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"F" | "FENCE" => {
|
||||
self.mode = TrimMode::Fence(Vec::new());
|
||||
self.mode = TrimMode::Fence(FencePick::fence());
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"C" | "CROSSING" => {
|
||||
@@ -3669,8 +3645,8 @@ impl CadCommand for TrimCommand {
|
||||
|
||||
fn on_point(&mut self, pt: DVec3) -> CmdResult {
|
||||
match &mut self.mode {
|
||||
TrimMode::Fence(pts) => {
|
||||
pts.push([pt.x, pt.y]);
|
||||
TrimMode::Fence(pick) => {
|
||||
pick.push([pt.x, pt.y]);
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
TrimMode::CrossFirst => {
|
||||
@@ -3698,9 +3674,9 @@ impl CadCommand for TrimCommand {
|
||||
|
||||
fn on_preview_wires(&mut self, pt: DVec3) -> Vec<WireModel> {
|
||||
match &self.mode {
|
||||
TrimMode::Fence(pts) if !pts.is_empty() => {
|
||||
let mut out = vec![fence_preview_wire(pts, [pt.x, pt.y], "trim_fence")];
|
||||
let mut fpts = pts.clone();
|
||||
TrimMode::Fence(pick) if !pick.is_empty() => {
|
||||
let mut out = vec![pick.preview([pt.x, pt.y], "trim_fence")];
|
||||
let mut fpts = pick.path();
|
||||
fpts.push([pt.x, pt.y]);
|
||||
out.extend(fence_result_preview(
|
||||
&self.all_entities,
|
||||
@@ -3715,7 +3691,7 @@ impl CadCommand for TrimCommand {
|
||||
TrimMode::CrossSecond(p1) => {
|
||||
let p1 = *p1;
|
||||
let p2 = [pt.x, pt.y];
|
||||
let mut out = vec![crossing_preview_wire(p1, p2, "trim_cross")];
|
||||
let mut out = vec![crossing_box_preview(p1, p2, "trim_cross")];
|
||||
let rect = [p1, [p1[0], p2[1]], p2, [p2[0], p1[1]], p1];
|
||||
let window = CrossingWindow {
|
||||
min: [p1[0].min(p2[0]), p1[1].min(p2[1])],
|
||||
@@ -3742,7 +3718,7 @@ impl CadCommand for TrimCommand {
|
||||
self.rebuild_geos();
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
TrimMode::Fence(pts) if pts.len() >= 2 => self.fence_run(&pts, None),
|
||||
TrimMode::Fence(pick) if pick.is_usable() => self.fence_run(&pick.path(), None),
|
||||
TrimMode::Fence(_)
|
||||
| TrimMode::CrossFirst
|
||||
| TrimMode::CrossSecond(_)
|
||||
@@ -3845,9 +3821,9 @@ impl CadCommand for ExtendCommand {
|
||||
self.edge_set.len()
|
||||
)
|
||||
.into_owned(),
|
||||
TrimMode::Fence(pts) => crate::tf!(
|
||||
TrimMode::Fence(pick) => crate::tf!(
|
||||
"EXTEND{edge} Fence: pick points [{} placed, Enter = extend crossed]:",
|
||||
pts.len()
|
||||
pick.len()
|
||||
)
|
||||
.into_owned(),
|
||||
TrimMode::CrossFirst => {
|
||||
@@ -3889,7 +3865,7 @@ impl CadCommand for ExtendCommand {
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"F" | "FENCE" => {
|
||||
self.mode = TrimMode::Fence(Vec::new());
|
||||
self.mode = TrimMode::Fence(FencePick::fence());
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"C" | "CROSSING" => {
|
||||
@@ -4131,8 +4107,8 @@ impl CadCommand for ExtendCommand {
|
||||
|
||||
fn on_point(&mut self, pt: DVec3) -> CmdResult {
|
||||
match &mut self.mode {
|
||||
TrimMode::Fence(pts) => {
|
||||
pts.push([pt.x, pt.y]);
|
||||
TrimMode::Fence(pick) => {
|
||||
pick.push([pt.x, pt.y]);
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
TrimMode::CrossFirst => {
|
||||
@@ -4157,9 +4133,9 @@ impl CadCommand for ExtendCommand {
|
||||
|
||||
fn on_preview_wires(&mut self, pt: DVec3) -> Vec<WireModel> {
|
||||
match &self.mode {
|
||||
TrimMode::Fence(pts) if !pts.is_empty() => {
|
||||
let mut out = vec![fence_preview_wire(pts, [pt.x, pt.y], "extend_fence")];
|
||||
let mut fpts = pts.clone();
|
||||
TrimMode::Fence(pick) if !pick.is_empty() => {
|
||||
let mut out = vec![pick.preview([pt.x, pt.y], "extend_fence")];
|
||||
let mut fpts = pick.path();
|
||||
fpts.push([pt.x, pt.y]);
|
||||
out.extend(fence_result_preview(
|
||||
&self.all_entities,
|
||||
@@ -4174,7 +4150,7 @@ impl CadCommand for ExtendCommand {
|
||||
TrimMode::CrossSecond(p1) => {
|
||||
let p1 = *p1;
|
||||
let p2 = [pt.x, pt.y];
|
||||
let mut out = vec![crossing_preview_wire(p1, p2, "extend_cross")];
|
||||
let mut out = vec![crossing_box_preview(p1, p2, "extend_cross")];
|
||||
let rect = [p1, [p1[0], p2[1]], p2, [p2[0], p1[1]], p1];
|
||||
let window = CrossingWindow {
|
||||
min: [p1[0].min(p2[0]), p1[1].min(p2[1])],
|
||||
@@ -4201,7 +4177,7 @@ impl CadCommand for ExtendCommand {
|
||||
self.rebuild_geos();
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
TrimMode::Fence(pts) if pts.len() >= 2 => self.fence_run(&pts, None),
|
||||
TrimMode::Fence(pick) if pick.is_usable() => self.fence_run(&pick.path(), None),
|
||||
TrimMode::Fence(_)
|
||||
| TrimMode::CrossFirst
|
||||
| TrimMode::CrossSecond(_)
|
||||
|
||||
+102
-6
@@ -13,6 +13,7 @@ use glam::DVec3;
|
||||
use crate::t;
|
||||
|
||||
use crate::command::{CadCommand, CmdOption, CmdResult};
|
||||
use crate::modules::draw::fence::FencePick;
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
pub struct SelectObjectsCommand {
|
||||
@@ -23,6 +24,13 @@ pub struct SelectObjectsCommand {
|
||||
/// When true, gathering continues until Enter / right-click commits the set.
|
||||
/// When false, the first completed selection action fires immediately.
|
||||
commit_on_enter: bool,
|
||||
/// A Fence / WPolygon / CPolygon path being picked point by point. While
|
||||
/// one is under way the host must send clicks here as points rather than
|
||||
/// treating them as picks, which is what `is_selection_gathering` reports.
|
||||
pick: Option<FencePick>,
|
||||
/// Whether the polygon being picked takes what it merely touches. Ignored
|
||||
/// by a fence, which has no inside to speak of.
|
||||
pick_crossing: bool,
|
||||
}
|
||||
|
||||
impl SelectObjectsCommand {
|
||||
@@ -32,6 +40,8 @@ impl SelectObjectsCommand {
|
||||
pending_cmd: pending_cmd.to_string(),
|
||||
handles: Vec::new(),
|
||||
commit_on_enter: true,
|
||||
pick: None,
|
||||
pick_crossing: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +52,8 @@ impl SelectObjectsCommand {
|
||||
pending_cmd: pending_cmd.to_string(),
|
||||
handles: Vec::new(),
|
||||
commit_on_enter: false,
|
||||
pick: None,
|
||||
pick_crossing: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +64,21 @@ impl CadCommand for SelectObjectsCommand {
|
||||
}
|
||||
|
||||
fn prompt(&self) -> String {
|
||||
if let Some(pick) = &self.pick {
|
||||
let label = if !pick.closed {
|
||||
t!("Fence")
|
||||
} else if self.pick_crossing {
|
||||
t!("Crossing polygon")
|
||||
} else {
|
||||
t!("Window polygon")
|
||||
};
|
||||
return t!(
|
||||
"%{mode}: pick points (%{count} placed, Enter to apply):",
|
||||
mode = label,
|
||||
count = pick.len()
|
||||
)
|
||||
.into_owned();
|
||||
}
|
||||
if self.commit_on_enter && !self.handles.is_empty() {
|
||||
t!(
|
||||
"%{cmd} Select objects (%{count} selected, Enter to apply):",
|
||||
@@ -67,16 +94,30 @@ impl CadCommand for SelectObjectsCommand {
|
||||
// Opt into the selection-gathering path; host routes clicks through
|
||||
// the normal selection system and calls on_selection_complete after each action.
|
||||
fn is_selection_gathering(&self) -> bool {
|
||||
true
|
||||
// A path being picked needs the clicks as points; handing them to the
|
||||
// selection system instead would pick objects under each vertex.
|
||||
self.pick.is_none()
|
||||
}
|
||||
|
||||
// Clickable selection keywords (#426): Previous re-selects the set the
|
||||
// last command worked on, Last the most recently created object. The
|
||||
// keywords are consumed centrally in `try_selection_keyword`, so they
|
||||
// also work typed — these buttons just surface them.
|
||||
// Clickable selection keywords (#426, #596). Window and Crossing fix the
|
||||
// sense of the next box, which dragging would otherwise take from the
|
||||
// direction the corner travels; All takes the whole space; Add and Remove
|
||||
// decide what a pick does for the rest of the selection; Previous
|
||||
// re-selects the set the last command worked on, Last the most recently
|
||||
// created object. All are consumed centrally in `try_selection_keyword`, so
|
||||
// they work typed as well — these buttons only surface them, which is what
|
||||
// the on-screen keyboard-less case needs.
|
||||
fn options(&self) -> Vec<CmdOption> {
|
||||
if self.commit_on_enter {
|
||||
vec![
|
||||
CmdOption::new(t!("Window").as_ref(), "W"),
|
||||
CmdOption::new(t!("Crossing").as_ref(), "C"),
|
||||
CmdOption::new(t!("Fence").as_ref(), "F"),
|
||||
CmdOption::new(t!("WPolygon").as_ref(), "WP"),
|
||||
CmdOption::new(t!("CPolygon").as_ref(), "CP"),
|
||||
CmdOption::new(t!("All").as_ref(), "ALL"),
|
||||
CmdOption::new(t!("Add").as_ref(), "A"),
|
||||
CmdOption::new(t!("Remove").as_ref(), "R"),
|
||||
CmdOption::new(t!("Previous").as_ref(), "P"),
|
||||
CmdOption::new(t!("Last").as_ref(), "L"),
|
||||
]
|
||||
@@ -99,13 +140,68 @@ impl CadCommand for SelectObjectsCommand {
|
||||
CmdResult::Relaunch(std::mem::take(&mut self.pending_cmd), handles)
|
||||
}
|
||||
|
||||
fn on_point(&mut self, _pt: DVec3) -> CmdResult {
|
||||
fn on_point(&mut self, pt: DVec3) -> CmdResult {
|
||||
if let Some(pick) = self.pick.as_mut() {
|
||||
pick.push([pt.x, pt.y]);
|
||||
}
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
|
||||
fn wants_text_input(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
// Fence and the two polygons are picked here rather than centrally: they
|
||||
// need somewhere to accumulate points, and the command is what outlives the
|
||||
// individual clicks. The rest of the keywords act at once and are consumed
|
||||
// in `try_selection_keyword`, which sees the token first. (#596)
|
||||
fn on_text_input(&mut self, text: &str) -> Option<CmdResult> {
|
||||
if !self.commit_on_enter {
|
||||
return None;
|
||||
}
|
||||
match text.trim().to_uppercase().as_str() {
|
||||
"F" | "FENCE" => {
|
||||
self.pick = Some(FencePick::fence());
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"CP" | "CPOLYGON" => {
|
||||
self.pick = Some(FencePick::polygon());
|
||||
self.pick_crossing = true;
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
"WP" | "WPOLYGON" => {
|
||||
self.pick = Some(FencePick::polygon());
|
||||
self.pick_crossing = false;
|
||||
Some(CmdResult::NeedPoint)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn on_preview_wires(&mut self, pt: DVec3) -> Vec<WireModel> {
|
||||
match &self.pick {
|
||||
Some(pick) if !pick.is_empty() => {
|
||||
vec![pick.preview([pt.x, pt.y], "select_fence")]
|
||||
}
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
|
||||
// Enter / right-click ends the gather phase and fires the pending command
|
||||
// with the accumulated selection. Nothing selected → cancel.
|
||||
fn on_enter(&mut self) -> CmdResult {
|
||||
// Finishing a path applies it and returns to picking objects; the set
|
||||
// it produced joins whatever was already gathered.
|
||||
if let Some(pick) = self.pick.take() {
|
||||
if pick.is_usable() {
|
||||
return CmdResult::SelectByPath {
|
||||
path: pick.path(),
|
||||
closed: pick.closed,
|
||||
crossing: self.pick_crossing,
|
||||
};
|
||||
}
|
||||
return CmdResult::NeedPoint;
|
||||
}
|
||||
if !self.commit_on_enter || self.handles.is_empty() {
|
||||
return CmdResult::Cancel;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user