diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 3374d6ac7a..5da1360eee 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2002-01-18 Juergen Vigna + + * inset.C (getMaxWidth): try to fix fluctuation of collapsable insets. + 2002-01-17 Jean-Marc Lasgouttes * insettabular.C (getMaxWidthOfCell): use LyXLength::inPixels diff --git a/src/insets/inset.C b/src/insets/inset.C index edf5125381..8b67739d57 100644 --- a/src/insets/inset.C +++ b/src/insets/inset.C @@ -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; }