forked from 1b-agent/opencadstudio-upstream
fix(sheetset): wasm build, lock files and sheet set field refresh
- `.dst` read/write go through native-only helpers (a browser answers "Not available"); the folder pickers are web no-ops; time stamps use iced::time (web-safe). - Lock files are written only for drawings that are sheets of an open set, released when the last set closes, and a lock a crashed session left (recorded with its process id, same user and machine) is taken back. The `.dwl2` header is well-formed and the date line comes from the OS long date on every platform. The 1 Hz poll runs only while a set is open. - Refreshing sheet set fields never stores `####`: fields no open set resolves keep their value, and only the hosts that changed are redrawn (and their tab marked modified). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
078306d8fc
commit
76f4bb97dc
5 files changed
+219
-71
No files matched your search
+8
-5
@@ -2643,12 +2643,15 @@ impl OpenCADStudio {
|
||||
};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
let plugin_drain = Subscription::none();
|
||||
// Open sheet sets reload when their .dst changes on disk.
|
||||
// While a sheet set is open: it reloads when its .dst changes on disk,
|
||||
// and its sheets' .dwl lock files follow the open tabs.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
// Open sheet sets reload when their .dst changes on disk; the
|
||||
// drawings' .dwl lock files follow the open tabs.
|
||||
let sheet_set_poll = iced::time::every(std::time::Duration::from_secs(1))
|
||||
.map(|_| Message::SheetSet(crate::ui::window::sheet_set::SheetSetMsg::Poll));
|
||||
let sheet_set_poll = if self.sheet_set.sets.is_empty() {
|
||||
Subscription::none()
|
||||
} else {
|
||||
iced::time::every(std::time::Duration::from_secs(1))
|
||||
.map(|_| Message::SheetSet(crate::ui::window::sheet_set::SheetSetMsg::Poll))
|
||||
};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
let sheet_set_poll = Subscription::none();
|
||||
let hatch_pattern_keys = if self.tabs[self.active_tab]
|
||||
|
||||
Reference in new issue
Block a user