]> git.lyx.org Git - features.git/commitdiff
Update row width when inset is indented
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Sep 2017 10:40:40 +0000 (12:40 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Sep 2017 10:40:40 +0000 (12:40 +0200)
Fixes bug #10758

src/TextMetrics.cpp

index 3d7e4aec49e0567f86bfacfac9862e55c3d4053a..21d34bc7c5002a59bb3a0d0f0e238bd69a60a637 100644 (file)
@@ -649,8 +649,10 @@ void TextMetrics::computeRowMetrics(Row & row, int width) const
                        break;
                case LYX_ALIGN_LEFT:
                        // a displayed inset that is flushed
-                       if (Inset const * inset = par.getInset(row.pos()))
+                       if (Inset const * inset = par.getInset(row.pos())) {
                                row.left_margin += inset->indent(*bv_);
+                               row.dimension().wid += inset->indent(*bv_);
+                       }
                        break;
                case LYX_ALIGN_RIGHT:
                        if (Inset const * inset = par.getInset(row.pos())) {