mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 02:28:19 +00:00
Patch by Richard Heck:
* src/Paragraph.cpp (applyLayout): - do not reset everything unconditionally on paragraph layout change (fix bug 3939) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19046 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e983dba010
commit
cadae06897
@ -42,6 +42,7 @@
|
|||||||
#include "TexRow.h"
|
#include "TexRow.h"
|
||||||
#include "VSpace.h"
|
#include "VSpace.h"
|
||||||
|
|
||||||
|
#include "frontends/alert.h"
|
||||||
#include "frontends/FontMetrics.h"
|
#include "frontends/FontMetrics.h"
|
||||||
|
|
||||||
#include "insets/InsetBibitem.h"
|
#include "insets/InsetBibitem.h"
|
||||||
@ -1652,9 +1653,15 @@ docstring Paragraph::expandLabel(Layout_ptr const & layout,
|
|||||||
void Paragraph::applyLayout(Layout_ptr const & new_layout)
|
void Paragraph::applyLayout(Layout_ptr const & new_layout)
|
||||||
{
|
{
|
||||||
layout(new_layout);
|
layout(new_layout);
|
||||||
params().labelWidthString(docstring());
|
LyXAlignment const oldAlign = params().align();
|
||||||
params().align(LYX_ALIGN_LAYOUT);
|
// FIXME The first check is due to the fact that LYX_ALIGN_LAYOUT
|
||||||
params().spacing(Spacing(Spacing::Default));
|
// is not required to be possible. A fix is on the way.
|
||||||
|
if ((oldAlign != LYX_ALIGN_LAYOUT) &&
|
||||||
|
!(oldAlign & layout()->alignpossible)) {
|
||||||
|
frontend::Alert::warning(_("Alignment not permitted"),
|
||||||
|
_("The new layout does not permit the alignment previously used.\nSetting to default."));
|
||||||
|
params().align(LYX_ALIGN_LAYOUT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user