mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +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 <config.h>
|
||||||
|
|
||||||
#include "ControlParagraph.h"
|
#include "ControlParagraph.h"
|
||||||
|
#include "Buffer.h"
|
||||||
|
#include "BufferParams.h"
|
||||||
#include "ButtonController.h"
|
#include "ButtonController.h"
|
||||||
#include "FuncRequest.h"
|
#include "FuncRequest.h"
|
||||||
#include "Lexer.h"
|
#include "Lexer.h"
|
||||||
@ -153,6 +155,11 @@ bool ControlParagraph::inInset() const
|
|||||||
return ininset_;
|
return ininset_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ControlParagraph::canIndent() const
|
||||||
|
{
|
||||||
|
return kernel().buffer().params().paragraph_separation ==
|
||||||
|
BufferParams::PARSEP_INDENT;
|
||||||
|
}
|
||||||
|
|
||||||
LyXAlignment ControlParagraph::alignPossible() const
|
LyXAlignment ControlParagraph::alignPossible() const
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,8 @@ public:
|
|||||||
///
|
///
|
||||||
bool inInset() const;
|
bool inInset() const;
|
||||||
///
|
///
|
||||||
|
bool canIndent() const;
|
||||||
|
///
|
||||||
LyXAlignment alignPossible() const;
|
LyXAlignment alignPossible() const;
|
||||||
///
|
///
|
||||||
LyXAlignment alignDefault() const;
|
LyXAlignment alignDefault() const;
|
||||||
|
@ -254,7 +254,9 @@ void QParagraph::update_contents()
|
|||||||
dialog_->alignmentToRadioButtons(newAlignment);
|
dialog_->alignmentToRadioButtons(newAlignment);
|
||||||
|
|
||||||
//indentation
|
//indentation
|
||||||
dialog_->indentCB->setChecked(!params.noindent());
|
bool const canindent = controller().canIndent();
|
||||||
|
dialog_->indentCB->setEnabled(canindent);
|
||||||
|
dialog_->indentCB->setChecked(canindent && !params.noindent());
|
||||||
|
|
||||||
// linespacing
|
// linespacing
|
||||||
int linespacing;
|
int linespacing;
|
||||||
|
Loading…
Reference in New Issue
Block a user