Resolve removal menu import and share visibility admission
This commit is contained in:
@@ -3,6 +3,7 @@ use super::*;
|
|||||||
use crate::behavior::scenario::{self, group_removal, selection};
|
use crate::behavior::scenario::{self, group_removal, selection};
|
||||||
use crate::diagram_selection::Snapshot;
|
use crate::diagram_selection::Snapshot;
|
||||||
use crate::diagram_usage::Target;
|
use crate::diagram_usage::Target;
|
||||||
|
use crate::model_menu;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
@@ -50,15 +51,19 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn scenario_removal_matches(&self, context: scenario::Context, snapshot: &Snapshot) -> bool {
|
fn scenario_removal_matches(&self, context: scenario::Context, snapshot: &Snapshot) -> bool {
|
||||||
self.scenario_context() == Some(context)
|
if self.scenario_context() != Some(context)
|
||||||
&& self
|
|| !self
|
||||||
.diagram_selection
|
.diagram_selection
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.is_some_and(|selected| selected.matches(snapshot, selection::context(context)))
|
.is_some_and(|selected| selected.matches(snapshot, selection::context(context)))
|
||||||
&& snapshot
|
{
|
||||||
.targets()
|
return false;
|
||||||
.iter()
|
}
|
||||||
.all(|target| self.multiselect_target_visible(target))
|
let visible = selection::visible(self.project(), context, self.selected);
|
||||||
|
snapshot
|
||||||
|
.targets()
|
||||||
|
.iter()
|
||||||
|
.all(|target| visible.contains(target))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn scenario_removal_event(&mut self, event: Event) -> Task<Message> {
|
pub(super) fn scenario_removal_event(&mut self, event: Event) -> Task<Message> {
|
||||||
|
|||||||
Reference in New Issue
Block a user