Fixed bug when inserting insets in right alligned paragraphs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2499 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-08-13 13:28:14 +00:00
parent 094ce1115b
commit b158f8a481
4 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2001-08-13 Juergen Vigna <jug@sad.it>
* text.C (fill): return 0 instead of 20 as this seems to be the more
correct value.
2001-08-13 Dekel Tsur <dekelts@tau.ac.il>
* encoding.C (TransformChar): Use lyxrc.font_norm_type instead of

View File

@ -1,5 +1,7 @@
2001-08-13 Juergen Vigna <jug@sad.it>
* inset.C (getMaxWidth): fixed bug of returning the wrong max width.
* insetcollapsable.C (edit): don't recollapse an already open inset.
* insettext.C: fixed problem when reinitializing LyXText by not doing

View File

@ -323,11 +323,14 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
// check for margins left/right and extra right margin "const 5"
if ((w - ((2 * TEXT_TO_INSET_OFFSET) + 5)) >= 0)
w -= (2 * TEXT_TO_INSET_OFFSET) + 5;
if (topx_set) {
if (topx_set && owner()) {
w -= top_x;
if (owner()) {
w += owner()->x();
}
w += owner()->x();
} 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!
w -= 20;
}
if (w < 10) {
w = 10;

View File

@ -978,7 +978,7 @@ LyXText::nextBreakPoint(BufferView * bview, Row const * row, int width) const
int LyXText::fill(BufferView * bview, Row * row, int paper_width) const
{
if (paper_width < 0)
return 20;
return 0;
int w;
// get the pure distance