]> git.lyx.org Git - features.git/commitdiff
Fix InsetBox::contentAlignment()
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 May 2018 13:11:06 +0000 (15:11 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 May 2018 13:11:06 +0000 (15:11 +0200)
Some cases where alignment is possible were missing.

Candidate for 2.3.x.

src/insets/InsetBox.cpp

index 2219c23e37032f89c27e72215a4cb0615954b905..7711277e0a90f2d6c22348fc8ebb1e3188ad19f2 100644 (file)
@@ -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