]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiParagraph.cpp
Add layout tag that determines if/when a paragraph can be indented.
[lyx.git] / src / frontends / qt4 / GuiParagraph.cpp
index 306085dd08d962a50289b03dc3541718d358965a..975b6512b46d51e4ed90fed7412829238eec338b 100644 (file)
@@ -227,7 +227,7 @@ void GuiParagraph::applyView()
 
        // label width
        params_.labelWidthString(qstring_to_ucs4(labelWidth->text()));
-       // indendation
+       // indentation
        params_.noindent(!indentCB->isChecked());
 
        dispatchParams();
@@ -336,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);
 }