]> git.lyx.org Git - lyx.git/commitdiff
Small fix and remove some warinings.
authorJürgen Vigna <jug@sad.it>
Thu, 14 Jun 2001 14:10:25 +0000 (14:10 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 14 Jun 2001 14:10:25 +0000 (14:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2125 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/insets/ChangeLog
src/insets/insettext.C
src/insets/insettext.h

index 841ead1254822fbd59bfb9b29100927e9f69d770..d3278201ed32d7298a49caf1deb112d3e17eb5bd 100644 (file)
@@ -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_);
        }
index 84ba5cfa542f395d90c5dd873f15a5d10c3df766..e8d0d50054ac585a0af4c3135625d214b7ed8d6d 100644 (file)
@@ -1,3 +1,7 @@
+2001-06-14  Juergen Vigna  <jug@sad.it>
+
+       * insettext.C (draw): removed warinings.
+
 2001-06-13  Juergen Vigna  <jug@sad.it>
 
        * insettabular.C (nodraw): only go down the tree if we don't have
index f47764bcb56f73d55638998e32484cb126bc7c80..4ce503b794279887ea3970650c0a9bf315796023 100644 (file)
@@ -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) &&
index abc0cf3aac08f7d7463c50819d33e5ed53f45ed2..50075adcf4659c1769f1066c15615c6fe4cc5f5e 100644 (file)
@@ -303,7 +303,7 @@ private:
        ///
        mutable int inset_y;
        ///
-       mutable int old_max_width;
+       mutable unsigned int old_max_width;
        ///
        bool no_selection;
        ///