FIX: When cut and paste to a different sheet origin is removed

Fixes #193
This commit is contained in:
Nicolás Hatcher
2024-12-16 01:02:12 +01:00
committed by Nicolás Hatcher Andrés
parent a5919d837f
commit e098105531
5 changed files with 44 additions and 9 deletions

View File

@@ -520,6 +520,7 @@ impl Model {
#[wasm_bindgen(js_name = "pasteFromClipboard")]
pub fn paste_from_clipboard(
&mut self,
source_sheet: u32,
source_range: JsValue,
clipboard: JsValue,
is_cut: bool,
@@ -529,7 +530,7 @@ impl Model {
let clipboard: ClipboardData =
serde_wasm_bindgen::from_value(clipboard).map_err(|e| to_js_error(e.to_string()))?;
self.model
.paste_from_clipboard(source_range, &clipboard, is_cut)
.paste_from_clipboard(source_sheet, source_range, &clipboard, is_cut)
.map_err(|e| to_js_error(e.to_string()))
}