]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiParagraph.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiParagraph.cpp
index a42972a6b1177f5169a64760b048f29c7366b5e0..975b6512b46d51e4ed90fed7412829238eec338b 100644 (file)
@@ -28,6 +28,7 @@
 #include "ParagraphParameters.h"
 #include "Spacing.h"
 
+#include "support/debug.h"
 #include "support/gettext.h"
 
 #include <QCheckBox>
@@ -226,7 +227,7 @@ void GuiParagraph::applyView()
 
        // label width
        params_.labelWidthString(qstring_to_ucs4(labelWidth->text()));
-       // indendation
+       // indentation
        params_.noindent(!indentCB->isChecked());
 
        dispatchParams();
@@ -310,7 +311,7 @@ ParagraphParameters const & GuiParagraph::params() const
        if (haveMultiParSelection()) {
                // FIXME: in case of multi-paragraph selection, it would be nice to
                // initialise the parameters that are common to all paragraphs.
-               static ParagraphParameters empty;
+               static ParagraphParameters const empty;
                return empty;
        }
        return bufferview()->cursor().innerParagraph().params();
@@ -335,8 +336,11 @@ bool GuiParagraph::haveMultiParSelection() const
        
 bool GuiParagraph::canIndent() const
 {
-       return buffer().params().paragraph_separation
-               == BufferParams::ParagraphIndentSeparation;
+       Layout const lay = bufferview()->cursor().innerParagraph().layout();
+       if (buffer().params().paragraph_separation
+               == BufferParams::ParagraphIndentSeparation)
+               return (lay.toggle_indent != ITOGGLE_NEVER);
+       return (lay.toggle_indent == ITOGGLE_ALWAYS);
 }