mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-27 04:06:52 -06:00
@@ -562,6 +562,24 @@ impl Dialog {
|
||||
defaults,
|
||||
)
|
||||
}
|
||||
"tableResize" => {
|
||||
let (table, range) = app
|
||||
.session
|
||||
.active()
|
||||
.and_then(|d| {
|
||||
let sh = d.wb.active()?;
|
||||
let t = sh.table_at(d.selection.active)?;
|
||||
Some((t.name.clone(), t.range.a1()))
|
||||
})
|
||||
.unwrap_or_default();
|
||||
Dialog::form(
|
||||
"tableResize",
|
||||
"Resize Table",
|
||||
"table.resize",
|
||||
vec![Text { key: "range", label: "New range for the table:" }],
|
||||
json!({"table": table, "range": range}),
|
||||
)
|
||||
}
|
||||
"dataValidation" => Dialog::form(
|
||||
"dataValidation",
|
||||
"Data Validation",
|
||||
|
||||
@@ -2284,6 +2284,11 @@ fn table_design(app: &mut SheetApp, ui: &mut Ui) {
|
||||
act(app, "table.rename", json!({"table": tname, "name": name}));
|
||||
}
|
||||
});
|
||||
let __k = big_button(ui, Icon::Table, "Resize\nTable", "Resize Table", false);
|
||||
control_keytip(app, ui, &__k, "dialog:tableResize");
|
||||
if __k.clicked() {
|
||||
app.open_dialog("tableResize", json!({}));
|
||||
}
|
||||
sep(ui);
|
||||
let __k = big_button(ui, Icon::Duplicates, "Remove\nDuplicates", "Remove Duplicates", false);
|
||||
control_keytip(app, ui, &__k, "data.removeDuplicates");
|
||||
|
||||
Reference in New Issue
Block a user