Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/electron.renderer/ui/modal/panel/EditAllAutoLayerRules.hx
Original file line number Diff line number Diff line change
Expand Up @@ -745,18 +745,6 @@ class EditAllAutoLayerRules extends ui.modal.Panel {
});

if( rg.isOptional )
ctx.addActionElement({
label: L.t._("Turn into an OPTIONAL group"),
subText: L.t._("An optional group is disabled everywhere by default, and can be enabled manually only in some specific levels."),
iconId: "optional",
cb: ()->{
invalidateRuleGroup(rg);
rg.isOptional = true;
rg.active = true; // just some cleanup
editor.ge.emit( LayerRuleGroupChanged(rg) );
},
});
else
ctx.addActionElement({
label: L.t._("Disable OPTIONAL state"),
cb: ()->{
Expand All @@ -772,6 +760,18 @@ class EditAllAutoLayerRules extends ui.modal.Panel {
);
},
});
else
ctx.addActionElement({
label: L.t._("Turn into an OPTIONAL group"),
subText: L.t._("An optional group is disabled everywhere by default, and can be enabled manually only in some specific levels."),
iconId: "optional",
cb: ()->{
invalidateRuleGroup(rg);
rg.isOptional = true;
rg.active = true; // just some cleanup
editor.ge.emit( LayerRuleGroupChanged(rg) );
},
});
});

// Wizard mode explanation
Expand Down