Insert SVG: the file picker opens on SVG files (#1801) (#1827)

* claim: #1801

* Insert SVG: the file picker opens on SVG files (#1801)

Every Open went through one host picker whose filters start with designs, CAD
files and meshes, so Insert SVG (and Insert DXF) in a sketch opened on STEP,
IGES and meshes, and the SVG file had to be found under another filter.

The host's pick_open now takes the extensions the command reads and offers
them as the picker's first, default filter. Insert SVG and Insert DXF pass
their type; every other Open passes none and keeps the list it had. The
browser host ignores them (it shows its own file panel).

---------

Co-authored-by: MateuszSychXpl <[email protected]>
This commit is contained in:
Mateusz SychandMateuszSychXpl authored and GitHub committed 2026-10-17 00:27:11 +00:00
1 parent a6ca2e8ca1
commit c599238653
7 files changed
+46 -14

No files matched your search

+1 -1
View File
@@ -481,7 +481,7 @@ mod web {
let panel = files.clone();
let services = Services {
// Open shows the browser's files (and the computer's, from there).
pick_open: Some(Box::new(move || {
pick_open: Some(Box::new(move |_: &[&str]| {
panel.panel.set(true);
Box::pin(std::future::ready(None))
})),