]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.cpp
Now Inset::dimension is only an access to cache
[lyx.git] / src / insets / InsetCollapsable.cpp
index 250b25cbc0cf6414d5b070374c39fdb54195a242..7a4c99952ddb38d3ce705fcea4d1f2ab36ac94b5 100644 (file)
@@ -258,7 +258,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
                view_[&bv].button_dim_.y2 = 0;
        }
 
-       Dimension const textdim = InsetText::dimension(bv);
+       Dimension const textdim = dimensionHelper(bv);
        int const baseline = y;
        int textx, texty;
        Geometry g = geometry(bv);
@@ -274,8 +274,9 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
                }
                // Do not draw the cue for INSERTED -- it is already in the button and
                // that's enough.
-               Changer dummy = make_change(pi.change_, Change(),
-                                           pi.change_.type == Change::INSERTED);
+               Changer dummy = (pi.change_.type == Change::INSERTED)
+                       ? make_change(pi.change_, Change())
+                       : Changer();
                InsetText::draw(pi, textx, texty);
                break;
        }
@@ -365,7 +366,7 @@ void InsetCollapsable::cursorPos(BufferView const & bv,
                status_ = Open;
 
        InsetText::cursorPos(bv, sl, boundary, x, y);
-       Dimension const textdim = InsetText::dimension(bv);
+       Dimension const textdim = dimensionHelper(bv);
 
        switch (geometry(bv)) {
        case LeftButton: