The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 2b40823d8e5e8b7bea654bbd8ffcb9d287b65484
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Dec 2 10:16:26 2012 +0100

    Implement resetArgs to InsetLayout (#8437)

diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx
index 7320540..bf62213 100644
--- a/lib/doc/Customization.lyx
+++ b/lib/doc/Customization.lyx
@@ -17321,7 +17321,81 @@ reference "des:FreeSpacing"
 \end_inset
 
 ) for information on `features'.
+\change_inserted -712698321 1354439699
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1354439705
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+ResetArgs
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+1
+\end_layout
+
+\end_inset
+
+] Resets the LaTeX arguments of this layout (as defined via the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+Argument
+\end_layout
+
+\end_inset
+
+ tag).
+ This is useful if you have copied a style via 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+CopyStyle
+\end_layout
+
+\end_inset
+
+, but you do not want to inherit its (required and optional) arguments.
+
+\change_deleted -712698321 1354439698
  
+\change_unchanged
+
 \end_layout
 
 \begin_layout Description
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index 0d9e88e..a86bef2 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -117,9 +117,10 @@ bool InsetLayout::read(Lexer & lex, TextClass const & 
tclass)
                IL_PREAMBLE,
                IL_REQUIRES,
                IL_RIGHTDELIM,
-               IL_SPELLCHECK,
                IL_REFPREFIX,
+               IL_RESETARGS,
                IL_RESETSFONT,
+               IL_SPELLCHECK,
                IL_END
        };
 
@@ -166,6 +167,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & 
tclass)
                { "preamble", IL_PREAMBLE },
                { "refprefix", IL_REFPREFIX },
                { "requires", IL_REQUIRES },
+               { "resetargs", IL_RESETARGS },
                { "resetsfont", IL_RESETSFONT },
                { "rightdelim", IL_RIGHTDELIM },
                { "spellcheck", IL_SPELLCHECK }
@@ -331,6 +333,12 @@ bool InsetLayout::read(Lexer & lex, TextClass const & 
tclass)
                        labelfont_ = font_;
                        break;
                }
+               case IL_RESETARGS:
+                       bool reset;
+                       lex >> reset;
+                       if (reset)
+                               latexargs_.clear();
+                       break;
                case IL_ARGUMENT:
                        readArgument(lex);
                        break;

-----------------------------------------------------------------------

Summary of changes:
 lib/doc/Customization.lyx  |   74 ++++++++++++++++++++++++++++++++++++++++++++
 src/insets/InsetLayout.cpp |   10 +++++-
 2 files changed, 83 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to