From: Juergen Spitzmueller Date: Fri, 11 May 2018 13:11:06 +0000 (+0200) Subject: Fix InsetBox::contentAlignment() X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3426 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=de67b68b1dc140321e5d0e2e6b4507c972703744;p=features.git Fix InsetBox::contentAlignment() Some cases where alignment is possible were missing. Candidate for 2.3.x. --- diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 2219c23e37..7711277e0a 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -238,7 +238,9 @@ ColorCode InsetBox::backgroundColor(PainterInfo const &) const LyXAlignment InsetBox::contentAlignment() const { - if (!params_.use_makebox) + // Custom horizontal alignment is only allowed with a fixed width + // and if either makebox or no inner box are used + if (params_.width.empty() || !(params_.use_makebox || !params_.inner_box)) return LYX_ALIGN_NONE; // The default value below is actually irrelevant