Wire captured saved-model group deletion and shared impact review
This commit is contained in:
@@ -326,6 +326,13 @@ pub fn view(app: &App) -> View<'_, Message> {
|
||||
);
|
||||
}
|
||||
if let Some(target) = app.delete_target.as_ref().filter(|_| app.delete_pending) {
|
||||
if target.saved.is_some() {
|
||||
return modal_width(
|
||||
root,
|
||||
crate::app::saved_removal::view::view(app, target),
|
||||
700.,
|
||||
);
|
||||
}
|
||||
if target.process.is_some() {
|
||||
return modal_width(
|
||||
root,
|
||||
@@ -482,6 +489,7 @@ fn diagram(app: &App) -> View<'_, Message> {
|
||||
.align_y(iced::Center);
|
||||
let canvas: View<'_, Message> = if let Some(id) = app.active_diagram {
|
||||
let program = DiagramCanvas {
|
||||
removal_input: &app.saved_removal_input,
|
||||
selection: app.diagram_selection.as_ref(),
|
||||
allocation: Some(app.allocation_capability()),
|
||||
project: app.project(),
|
||||
@@ -674,17 +682,25 @@ fn diagram(app: &App) -> View<'_, Message> {
|
||||
)),
|
||||
));
|
||||
}
|
||||
selection_controls = selection_controls.push(
|
||||
button(text("Delete from model…").size(12))
|
||||
.padding([6, 8])
|
||||
.on_press_maybe(
|
||||
crate::app::saved_removal::begin(app)
|
||||
.filter(|_| app.saved_removal_enabled()),
|
||||
),
|
||||
);
|
||||
selection_controls = selection_controls
|
||||
.push(action(
|
||||
"Clear selection",
|
||||
"Clear",
|
||||
Message::DiagramSelection(crate::app::multiselect::Event::Clear(
|
||||
snapshot.context(),
|
||||
)),
|
||||
))
|
||||
.push(
|
||||
label(format!(
|
||||
"Properties edit only {}",
|
||||
short(app.project().named(app.selected), 36)
|
||||
"Edit only {}",
|
||||
short(app.project().named(app.selected), 12)
|
||||
))
|
||||
.wrapping(widget::text::Wrapping::None),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user