]> git.lyx.org Git - lyx.git/commitdiff
Small fix and optimization.
authorJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 09:39:15 +0000 (09:39 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 09:39:15 +0000 (09:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2475 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettext.C

index 86e9b6df5bdc988d25c072adc88d3699f439c9a0..10e55362bdb9e7034ce16d746ec3ebfa7aa9d32f 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-10  Juergen Vigna  <jug@sad.it>
+
+       * insettext.C (update): comment this out as it seems first wrong
+       and second not needed anymore!
+
 2001-08-08  Juergen Vigna  <jug@sad.it>
 
        * insettabular.C (setPos): fixed wrong actrow < rows() check.
index afb5c52623a780cecc073daee1fbaefa0185a563..18f1f15fe0b2824311190c07f3541617221927ef 100644 (file)
@@ -167,7 +167,7 @@ void InsetText::init(InsetText const * ins, bool same_id)
        insetWidth = 0;
        old_max_width = 0;
        no_selection = false;
-       need_update = INIT;
+       need_update = FULL;
        drawTextXOffset = 0;
        drawTextYOffset = 0;
        xpos = 0.0;
@@ -267,7 +267,7 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
                lex.printError("Missing \\end_inset at this point. "
                                           "Read: `$$Token'");
        }
-       need_update = INIT;
+       need_update = FULL;
 }
 
 
@@ -476,7 +476,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
                clearFrame(pain, cleared);
        x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
        if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
-               need_update |= INIT;
+               need_update |= FULL;
        } else if (need_update != INIT)
                need_update = NONE;
        if (clear)
@@ -540,6 +540,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
                lt = getLyXText(bv);
                clear = true;
        }
+#if 0
        int oldw = insetWidth;
        insetWidth = lt->width + (2 * TEXT_TO_INSET_OFFSET);
        if (oldw != insetWidth) {
@@ -550,6 +551,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
                in_update = false;
                return;
        }
+#endif
        if ((need_update & CURSOR_PAR) && (lt->status() == LyXText::UNCHANGED) &&
                the_locking_inset)
        {
@@ -1903,6 +1905,7 @@ void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
 
 void InsetText::resizeLyXText(BufferView * bv, bool force) const
 {
+//     lyxerr << "InsetText::resizeLyXText\n";
        if (!par->next() && !par->size()) // no data, resize not neccessary!
                return;
        // one endless line, resize normally not necessary
@@ -1942,6 +1945,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
 
 void InsetText::reinitLyXText(bool wrong_cursor) const
 {
+//     lyxerr << "InsetText::reinitLyXText\n";
        for(Cache::iterator it = cache.begin(); it != cache.end(); ++it) {
                lyx::Assert(it->second.text.get());
 
@@ -2115,7 +2119,7 @@ void InsetText::paragraph(Paragraph * p)
        }
 #endif
        // redraw myself when asked for
-       need_update |= INIT;
+       need_update = INIT;
 }