mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-30 21:56:53 -06:00
fix(engine): set default workbook author (#2448)
This commit is contained in:
@@ -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