]> git.lyx.org Git - features.git/commitdiff
This makes fluctuation of inset hopefully better (#147).
authorJürgen Vigna <jug@sad.it>
Fri, 18 Jan 2002 15:40:31 +0000 (15:40 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 18 Jan 2002 15:40:31 +0000 (15:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3418 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/inset.C

index 3374d6ac7ae17275354f18b17d09cdffd05392ab..5da1360eee79b43d59ad47e21e3d926a701e405c 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-18  Juergen Vigna  <jug@sad.it>
+
+       * inset.C (getMaxWidth): try to fix fluctuation of collapsable insets.
+
 2002-01-17  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * insettabular.C (getMaxWidthOfCell): use LyXLength::inPixels
index edf512538109cdd55b2161cfd79f5c46d2e37432..8b67739d5712b790a008d6e9ee8657df9d3bab78 100644 (file)
@@ -337,16 +337,12 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
        if (topx_set && owner()) {
                w -= top_x;
                w += owner()->x();
-       }
-#if 0 // already handled above now!!!
-       else if (!owner()) {
-               // give some left margin this should be made better!
-               // Idea: LyXText::giveLeftMargin(Inset * inset) will search the
-               //       inset in the text and return the LeftMargin of that row!
-               lyxerr << "w -= 20\n";
+       } else if (owner()) {
+               // this is needed as otherwise we might have a too large inset if
+               // its top_x afterwards changes to LeftMargin so we try to put at
+               // least the default margin as top_x
                w -= 20;
        }
-#endif
        if (w < 10) {
                w = 10;
        }