forked from 1b-agent/opencadstudio-upstream
fix: follow-ups to the merged PRs
- Selection filter: condition rows name INSERT as a block reference, as the object-type list does since #1726 (shared qselect_type_label). - MCP: re-pin the tool schema digest for the view_background action added in #1722. - -VIEW: fix an indentation slip and wrap two long lines from #1722. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
03445a540d
commit
74bffe77be
4 files changed
+21
-10
No files matched your search
@@ -892,7 +892,10 @@ impl OpenCADStudio {
|
||||
.push_error(crate::t!("Usage: VIEW DELETE <name>").as_ref());
|
||||
} else {
|
||||
if let Some(view) = self.tabs[i].scene.document.views.remove(&name) {
|
||||
crate::scene::erase_background(&mut self.tabs[i].scene.document, view.background_handle);
|
||||
crate::scene::erase_background(
|
||||
&mut self.tabs[i].scene.document,
|
||||
view.background_handle,
|
||||
);
|
||||
self.command_line
|
||||
.push_output(crate::tf!("View '{}' deleted.", name).as_ref());
|
||||
} else {
|
||||
@@ -910,7 +913,7 @@ impl OpenCADStudio {
|
||||
let found = self.tabs[i].scene.document.views.get(&name).cloned();
|
||||
if let Some(v) = found {
|
||||
self.tabs[i].scene.restore_named_view(&v);
|
||||
self.apply_view_render_mode(i, &v);
|
||||
self.apply_view_render_mode(i, &v);
|
||||
self.command_line.push_output(
|
||||
crate::tf!("View '{}' restored.", v.name).as_ref(),
|
||||
);
|
||||
|
||||
@@ -155,7 +155,10 @@ impl OpenCADStudio {
|
||||
for name in &doomed {
|
||||
let removed = self.tabs[i].scene.document.views.remove(name);
|
||||
if let Some(view) = removed {
|
||||
crate::scene::erase_background(&mut self.tabs[i].scene.document, view.background_handle);
|
||||
crate::scene::erase_background(
|
||||
&mut self.tabs[i].scene.document,
|
||||
view.background_handle,
|
||||
);
|
||||
}
|
||||
self.tabs[i].scene.document.delete_layer_state(&snapshot_name(name));
|
||||
}
|
||||
|
||||
+11
-6
@@ -1506,6 +1506,15 @@ pub(super) fn qselect_overlay<'a>(
|
||||
)
|
||||
}
|
||||
|
||||
/// Object type label for the selection filter; INSERT reads as a block reference.
|
||||
fn qselect_type_label(name: &str) -> String {
|
||||
if name == "Insert" {
|
||||
t!("Block Reference").into_owned()
|
||||
} else {
|
||||
t!(name).into_owned()
|
||||
}
|
||||
}
|
||||
|
||||
fn qselect_content<'a>(
|
||||
state: &'a crate::app::QSelectState,
|
||||
types: &[String],
|
||||
@@ -1655,7 +1664,7 @@ fn qselect_content<'a>(
|
||||
let type_label = condition
|
||||
.type_filter
|
||||
.as_deref()
|
||||
.map(|name| t!(name).into_owned())
|
||||
.map(qselect_type_label)
|
||||
.unwrap_or_else(|| t!(QSELECT_ANY_TYPE).into_owned());
|
||||
let property_label = condition
|
||||
.property
|
||||
@@ -1727,11 +1736,7 @@ fn qselect_content<'a>(
|
||||
row![
|
||||
label(t!("Object type:")),
|
||||
iced::widget::pick_list(Some(type_sel), type_options, |value| {
|
||||
if value == "Insert" {
|
||||
t!("Block Reference").into_owned()
|
||||
} else {
|
||||
t!(value).into_owned()
|
||||
}
|
||||
qselect_type_label(value)
|
||||
})
|
||||
.on_select(|s: String| {
|
||||
if s == QSELECT_ANY_TYPE {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ const MODERN_PROTOCOL_VERSION: &str = "2026-07-28";
|
||||
///
|
||||
/// `block_delete` gained its optional `force` parameter.
|
||||
#[cfg(test)]
|
||||
const TOOL_SCHEMA_DIGEST: &str = "1cd356f6b9352458e8318c1424722ec3d8d2e4730dc89ac339dfdecafc5dee9f";
|
||||
const TOOL_SCHEMA_DIGEST: &str = "cf3b464a7664d78dfaa5d68a3c059b78de638884b95d189f955f6a0928909544";
|
||||
const MAX_REQUEST: usize = 1_048_576;
|
||||
const MAX_RESPONSE: u64 = 16 * 1024 * 1024;
|
||||
const CACHE_TTL_MS: u64 = 3_600_000;
|
||||
|
||||
Reference in new issue
Block a user