]> git.lyx.org Git - lyx.git/blobdiff - src/insets/updatableinset.C
My patch from yesterday
[lyx.git] / src / insets / updatableinset.C
index 9ed4b5cb7f73d34248933b4e9e132c9e626d613c..9ba5820d56e1badcabcb2d92f58469d99237b31a 100644 (file)
@@ -73,8 +73,7 @@ void UpdatableInset::edit(BufferView *, bool)
 
 
 void UpdatableInset::draw(BufferView *, LyXFont const &,
-                         int /* baseline */, float & x,
-                         bool/*cleared*/) const
+                         int /* baseline */, float & x) const
 {
        x += float(scx);
        // ATTENTION: don't do the following here!!!
@@ -111,8 +110,6 @@ void UpdatableInset::scroll(BufferView * bv, float s) const
        if ((tmp_top_x + scx + width(bv, font)) < (workW / 2)) {
                scx += (workW / 2) - (tmp_top_x + scx + width(bv, font));
        }
-
-       // bv->updateInset(const_cast<UpdatableInset *>(this), false);
 }
 
 void UpdatableInset::scroll(BufferView * bv, int offset) const
@@ -135,7 +132,6 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
                        scx += offset;
                }
        }
-//     bv->updateInset(const_cast<UpdatableInset *>(this), false);
 }
 
 
@@ -153,7 +149,7 @@ Inset::RESULT UpdatableInset::localDispatch(FuncRequest const & ev)
                        int const xx = strToInt(ev.argument);
                        scroll(ev.view(), xx);
                }
-               ev.view()->updateInset(this, false);
+               ev.view()->updateInset(this);
 
                return DISPATCHED;
        }
@@ -168,7 +164,7 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
                w = static_cast<UpdatableInset*>
                        (owner())->getMaxWidth(bv, this);
        } else {
-               w = bv->text->workWidth(*bv, const_cast<UpdatableInset *>(this));
+               w = bv->text->workWidth(const_cast<UpdatableInset *>(this));
        }
        if (w < 0) {
                return -1;
@@ -217,7 +213,7 @@ bool UpdatableInset::nextChange(BufferView * bv, lyx::pos_type &)
        return false;
 }
 
+
 bool UpdatableInset::searchForward(BufferView * bv, string const &,
                                   bool, bool)
 {