mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fix for bug 3524: Indent checkbox is enabled even when paragraphs are marked
with skips. Added helper method canIndent() to controller and appropriate logic to QParagraph::update_contents(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18236 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7753dd6e6f
commit
bd71f0adac
@ -12,6 +12,8 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlParagraph.h"
|
||||
#include "Buffer.h"
|
||||
#include "BufferParams.h"
|
||||
#include "ButtonController.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "Lexer.h"
|
||||
@ -153,6 +155,11 @@ bool ControlParagraph::inInset() const
|
||||
return ininset_;
|
||||
}
|
||||
|
||||
bool ControlParagraph::canIndent() const
|
||||
{
|
||||
return kernel().buffer().params().paragraph_separation ==
|
||||
BufferParams::PARSEP_INDENT;
|
||||
}
|
||||
|
||||
LyXAlignment ControlParagraph::alignPossible() const
|
||||
{
|
||||
|
@ -40,6 +40,8 @@ public:
|
||||
///
|
||||
bool inInset() const;
|
||||
///
|
||||
bool canIndent() const;
|
||||
///
|
||||
LyXAlignment alignPossible() const;
|
||||
///
|
||||
LyXAlignment alignDefault() const;
|
||||
|
@ -254,7 +254,9 @@ void QParagraph::update_contents()
|
||||
dialog_->alignmentToRadioButtons(newAlignment);
|
||||
|
||||
//indentation
|
||||
dialog_->indentCB->setChecked(!params.noindent());
|
||||
bool const canindent = controller().canIndent();
|
||||
dialog_->indentCB->setEnabled(canindent);
|
||||
dialog_->indentCB->setChecked(canindent && !params.noindent());
|
||||
|
||||
// linespacing
|
||||
int linespacing;
|
||||
|
Loading…
Reference in New Issue
Block a user