mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-06 02:21:03 +00:00
fix(engine): set default workbook author (#2448)
This commit is contained in:
1 parent
45f5ab18e4
commit
fa6ccc6ae5
1 file changed
+1
@@ -547,6 +547,7 @@ impl Session {
|
||||
pub fn new_workbook(&mut self) -> usize {
|
||||
let n = (1..).find(|n| !self.docs.iter().any(|d| d.title == format!("Book{n}") && d.path.is_none())).unwrap_or(1);
|
||||
let mut wb = Workbook::new();
|
||||
wb.props.author = self.prefs.user_name.clone();
|
||||
for _ in 1..self.prefs.sheets_in_new_workbook.clamp(1, 255) {
|
||||
let name = wb.next_sheet_name();
|
||||
wb.sheets.push(Arc::new(gridcraft_model::Sheet::new(name)));
|
||||
|
||||
Reference in new issue
Block a user