On Thu, Oct 21, 2021 at 08:14:27PM +0300, Yuriy Skalko wrote:
> 
> Now LyX has functions for adding one module (LFUN_LAYOUT_MODULE_ADD) and for
> removing all modules (LFUN_LAYOUT_MODULES_CLEAR), but removing only one
> module is impossible. I propose to add such function:
> LFUN_LAYOUT_MODULE_REMOVE.
> 
> My current use case: adding and removing module "Minimalistic Insets" to
> unclutter document with many branch insets by hiding their labels during
> work on content.
> 
> Without such LFUN this should be done manually. With it we will be able to
> do:
> 
> layout-module-add minimalistic
> layout-module-remove minimalistic

I like this idea! What if layout-module-remove is used on a module that
a different module depends on? e.g., AMS Theorems (Extended) depends on
AMS Theorems. If I have both added and I try to remove AMS Theorems,
what happens? Do we need a layoutModuleCanBeRemoved helper function?
Actually there must already be some code because "delete" is greyed out
if I do this in the GUI.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to