From 3eaf3246be271fd942b8a3371e8e8dac4cfa09b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 14 Jun 2001 14:10:25 +0000 Subject: [PATCH] Small fix and remove some warinings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2125 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 3 +-- src/insets/ChangeLog | 4 ++++ src/insets/insettext.C | 12 ++++-------- src/insets/insettext.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 841ead1254..d3278201ed 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -945,8 +945,7 @@ void BufferView::Pimpl::workAreaExpose() void BufferView::Pimpl::update() { if (screen_.get() && - (!bv_->text->theLockingInset() || - !bv_->text->theLockingInset()->nodraw())) + (!bv_->theLockingInset() || !bv_->theLockingInset()->nodraw())) { screen_->Update(bv_->text, bv_); } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 84ba5cfa54..e8d0d50054 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2001-06-14 Juergen Vigna + + * insettext.C (draw): removed warinings. + 2001-06-13 Juergen Vigna * insettabular.C (nodraw): only go down the tree if we don't have diff --git a/src/insets/insettext.C b/src/insets/insettext.C index f47764bcb5..4ce503b794 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -292,7 +292,9 @@ void InsetText::draw(BufferView * bv, LyXFont const & f, return; if (top_x != int(x)) { - if ((getMaxWidth(bv, this) > 0) && (TEXT(bv)->width != old_max_width)){ + if ((getMaxWidth(bv, this) > 0) && + (TEXT(bv)->width != old_max_width)) + { resizeLyXText(bv); need_update |= FULL; old_max_width = TEXT(bv)->width; @@ -330,12 +332,6 @@ void InsetText::draw(BufferView * bv, LyXFont const & f, } x += TEXT_TO_INSET_OFFSET; -#ifdef WITH_WARNINGS -#warning Jürgen, why is this a block of its own? (Lgb) -#warning because you told me to define variables only in local context (Jug)! -#warning then make it a function/method of its own. (Lgb) -#endif - { int y = 0; Row * row = TEXT(bv)->GetRowNearY(y); int y_offset = baseline - row->ascent_of_text(); @@ -379,7 +375,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f, bv->screen()->Update(TEXT(bv), bv, y_offset, int(x)); locked = true; } - } + TEXT(bv)->refresh_y = 0; TEXT(bv)->status = LyXText::UNCHANGED; if ((need_update != CURSOR_PAR) && diff --git a/src/insets/insettext.h b/src/insets/insettext.h index abc0cf3aac..50075adcf4 100644 --- a/src/insets/insettext.h +++ b/src/insets/insettext.h @@ -303,7 +303,7 @@ private: /// mutable int inset_y; /// - mutable int old_max_width; + mutable unsigned int old_max_width; /// bool no_selection; /// -- 2.39.5