forked from 1b-agent/opencadstudio-upstream
feat: embed images (OLE2FRAME), print pipeline fixes, plot prefs, community fonts
- IMAGEEMBED: pack raster images into OLE2FRAME entities so a .dwg is self-contained; 'Embed Image' entry in the XREF attach menu; control/MCP op embed_image for external tools; dxf_name for OLE2FRAME queries. - Scene: populate_images_from_document now rebuilds OLE2FRAME and PDF underlay models too (they used to vanish after any XREF op). - Printing: add PRINTER_ENUM_NETWORK pass when listing printers; GDI spooler fallback (hayro raster at 300 DPI + StretchDIBits) for hosts whose PDF handler registers no print verb; DEVMODE orientation with a 90-degree raster rotation fallback for v4 drivers; fix the fit-scale precedence bug that printed blank pages. - PDF export dialogs on Windows use the async file dialog so the native overwrite confirmation no longer deadlocks the UI thread. - Plot dialog: persist the chosen printer (saved on selection) and the picked plot window across sessions; page setups with no device no longer reset the output device. - Community fonts: detect unresolvable .shx references on open and offer a download from the repository's fonts/ folder (contribution guide in fonts/README.md); custom font source URL setting for intranet font servers; downloaded fonts resolve from the per-user fonts directory.
This commit is contained in:
1 parent
1450fdeedf
commit
28efbffd57
27 files changed
+1767
-66
No files matched your search
+20
-1
@@ -375,7 +375,7 @@ fn image_triangle_matrix(p: [[f32; 2]; 3], uv: [[f32; 2]; 3]) -> Option<[f32; 6]
|
||||
/// The parent comes from `iced::window::run`, keeping the portal request tied
|
||||
/// to the visible app window on Wayland instead of silently resolving to
|
||||
/// `None` on desktops that reject a parentless save dialog (#537).
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(all(not(target_arch = "wasm32"), not(target_os = "windows")))]
|
||||
pub fn pick_pdf_path_owned(
|
||||
stem: String,
|
||||
parent: &dyn iced::window::Window,
|
||||
@@ -392,6 +392,25 @@ pub fn pick_pdf_path_owned(
|
||||
Some(path)
|
||||
}
|
||||
|
||||
/// Windows: pick the PDF destination with the async dialog on a worker
|
||||
/// thread. The parented blocking dialog ran `IFileDialog::Show` on the UI
|
||||
/// thread inside the window callback, and when the target name already
|
||||
/// existed the overwrite-confirmation popup is a second nested modal that
|
||||
/// never gets pumped there — the app froze instead of asking. The async
|
||||
/// backend runs the dialog off-thread; it is the same pattern the DWG
|
||||
/// Save As flow uses, whose confirm popup works.
|
||||
#[cfg(all(not(target_arch = "wasm32"), target_os = "windows"))]
|
||||
pub async fn pick_pdf_path_async(stem: String) -> Option<std::path::PathBuf> {
|
||||
let handle = crate::sys::file_dialog()
|
||||
.set_title(crate::t!("Export as PDF").as_ref())
|
||||
.set_file_name(format!("{stem}.pdf"))
|
||||
.add_filter(crate::t!("PDF Files").as_ref(), &["pdf"])
|
||||
.add_filter(crate::t!("All Files").as_ref(), &["*"])
|
||||
.save_file()
|
||||
.await?;
|
||||
Some(crate::sys::handle_path(&handle))
|
||||
}
|
||||
|
||||
// ── PDF builder ───────────────────────────────────────────────────────────
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
||||
Reference in new issue
Block a user