mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 12:17:14 -06:00
Properties: one filter leaves out Lock and Isolate Group while they're off (keeps show() within the cognitive complexity lint #4299 added)
This commit is contained in:
@@ -130,10 +130,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
}
|
||||
if is_group {
|
||||
actions.push((tl!("Ungroup"), "object.ungroup"));
|
||||
// Isolate Group is left out while Enter Isolation Mode is off, as it is while an opacity mask is edited.
|
||||
if crate::menus::enabled(app, "object.isolate") {
|
||||
actions.push((tl!("Isolate Group"), "object.isolate"));
|
||||
}
|
||||
actions.push((tl!("Isolate Group"), "object.isolate"));
|
||||
}
|
||||
if is_live {
|
||||
actions.push((tl!("Expand Shape"), "object.expandShape"));
|
||||
@@ -149,10 +146,10 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
actions.push((tl!("Offset Path"), "object.path.offsetPath"));
|
||||
actions.push((tl!("Simplify"), "object.path.simplify"));
|
||||
actions.push((tl!("Arrange: Bring to Front"), "object.arrange.bringToFront"));
|
||||
// Lock is listed only when Object › Lock › Selection is on, so not in isolation mode.
|
||||
if crate::menus::enabled(app, "object.lock") {
|
||||
actions.push((tl!("Lock"), "object.lock"));
|
||||
}
|
||||
actions.push((tl!("Lock"), "object.lock"));
|
||||
// Lock and Isolate Group are left out while their commands are off (in isolation mode, while
|
||||
// an opacity mask is edited).
|
||||
actions.retain(|(_, id)| !matches!(*id, "object.lock" | "object.isolate") || crate::menus::enabled(app, id));
|
||||
let w = (ui.available_width() - 6.0) / 2.0;
|
||||
for pair in actions.chunks(2) {
|
||||
ui.horizontal(|ui| {
|
||||
|
||||
Reference in New Issue
Block a user