and most of the explicit update() calls in the dispatchers can
bprobably be removed as well. The dispatch result should take care of
it...
Andre'
--
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
Index: BufferView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.C,v
retrieving revision 1.207
diff -u -p -r1.207 BufferView.C
--- BufferView.C 10 Nov 2003 09:06:31 -0000 1.207
+++ BufferView.C 10 Nov 2003 13:14:50 -0000
@@ -394,12 +394,6 @@ void BufferView::hideCursor()
}
-void BufferView::updateInset(InsetOld const * inset)
-{
- pimpl_->updateInset(inset);
-}
-
-
bool BufferView::ChangeRefsIfUnique(string const & from, string const & to)
{
// Check if the label 'from' appears more than once
Index: BufferView.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.h,v
retrieving revision 1.151
diff -u -p -r1.151 BufferView.h
--- BufferView.h 10 Nov 2003 09:06:31 -0000 1.151
+++ BufferView.h 10 Nov 2003 13:14:50 -0000
@@ -86,19 +86,6 @@ public:
bool fitCursor();
/// perform pending painting updates
void update();
- /** update for a particular inset. Gets a pointer and not a
- * reference because we really need the pointer information
- * to find it in the buffer.
- *
- * Extracted from Matthias notes:
- *
- * If a inset wishes any redraw and/or update it just has to call
- * updateInset(this). It's is completly irrelevant, where the inset is.
- * UpdateInset will find it in any paragraph in any buffer.
- * Of course the insets in the current paragraph/buffer
- * are checked first, so no performance problem should occur.
- */
- void updateInset(InsetOld const *);
/// reset the scrollbar to reflect current view position
void updateScrollbar();
/// FIXME
@@ -196,9 +183,9 @@ public:
bool dispatch(FuncRequest const & argument);
/// set target x position of cursor
- void BufferView::x_target(int x);
+ void x_target(int x);
/// return target x position of cursor
- int BufferView::x_target() const;
+ int x_target() const;
/// access to cursor
LCursor & cursor();
Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.455
diff -u -p -r1.455 BufferView_pimpl.C
--- BufferView_pimpl.C 10 Nov 2003 11:26:33 -0000 1.455
+++ BufferView_pimpl.C 10 Nov 2003 13:14:50 -0000
@@ -599,9 +599,17 @@ void BufferView::Pimpl::update()
{
//lyxerr << "BufferView::update()" << endl;
// fix cursor coordinate cache in case something went wrong
+
+ // check needed to survive LyX startup
if (bv_->getLyXText()) {
- // check needed to survive LyX startup
bv_->getLyXText()->redoCursor();
+
+ // update all 'visible' paragraphs
+ ParagraphList::iterator beg, end;
+ getVisiblePars(beg, end);
+ bv_->text->redoParagraphs(beg, end);
+
+ updateScrollbar();
}
screen().redraw(*bv_);
}
@@ -938,7 +946,7 @@ bool BufferView::Pimpl::workAreaDispatch
cmd2.y -= inset->y();
res = inset->dispatch(cmd2);
if (res.update())
- bv_->updateInset(inset);
+ bv_->update();
res.update(false);
}
@@ -1094,8 +1102,7 @@ bool BufferView::Pimpl::dispatch(FuncReq
InsetBase * inset = owner_->getDialogs().getOpenInset(name);
if (inset) {
// This works both for 'original' and 'mathed' insets.
- // Note that the localDispatch performs updateInset
- // also.
+ // Note that the localDispatch performs update also.
FuncRequest fr(bv_, LFUN_INSET_MODIFY, ev.argument);
inset->dispatch(fr);
} else {
@@ -1107,21 +1114,10 @@ bool BufferView::Pimpl::dispatch(FuncReq
case LFUN_INSET_INSERT: {
InsetOld * inset = createInset(ev);
- if (inset && insertInset(inset)) {
- updateInset(inset);
-
- string const name = ev.getArg(0);
- if (name == "bibitem") {
- // We need to do a redraw because the maximum
- // InsetBibitem width could have changed
-#warning check whether the update() is needed at all
- bv_->update();
- }
- } else {
+ if (!inset || !insertInset(inset))
delete inset;
- }
+ break;
}
- break;
case LFUN_FLOAT_LIST:
if (tclass.floats().typeExist(ev.argument)) {
@@ -1273,23 +1269,6 @@ bool BufferView::Pimpl::insertInset(Inse
}
-void BufferView::Pimpl::updateInset(InsetOld const * /*inset*/)
-{
- if (!available())
- return;
-
-#warning used for asynchronous updates?
- //bv_->text->redoParagraph(outerPar(*bv_->buffer(), inset));
-
- // this should not be needed, but it is...
- bv_->text->redoParagraph(bv_->text->cursorPar());
- // bv_->text->fullRebreak();
-
- update();
- updateScrollbar();
-}
-
-
bool BufferView::Pimpl::ChangeInsets(InsetOld::Code code,
string const & from, string const & to)
{
@@ -1346,4 +1325,23 @@ void BufferView::Pimpl::updateParagraphD
data = "update " + tostr(accept) + '\n' + data;
bv_->owner()->getDialogs().update("paragraph", data);
+}
+
+
+void BufferView::Pimpl::getVisiblePars
+ (ParagraphList::iterator & beg, ParagraphList::iterator & end)
+{
+ beg = bv_->text->cursorPar();
+ end = beg;
+
+ for ( ; beg != bv_->text->ownerParagraphs().begin(); --beg)
+ if (beg->y - top_y() < 0)
+ break;
+
+ if (beg != bv_->text->ownerParagraphs().begin())
+ --beg;
+
+ for ( ; end != bv_->text->ownerParagraphs().end(); ++end)
+ if (end->y - top_y() > workarea().workHeight())
+ break;
}
Index: BufferView_pimpl.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.h,v
retrieving revision 1.108
diff -u -p -r1.108 BufferView_pimpl.h
--- BufferView_pimpl.h 10 Nov 2003 09:06:33 -0000 1.108
+++ BufferView_pimpl.h 10 Nov 2003 13:14:50 -0000
@@ -104,8 +104,6 @@ struct BufferView::Pimpl : public boost:
void center();
///
bool insertInset(InsetOld * inset, std::string const & lout = std::string());
- ///
- void updateInset(InsetOld const * inset);
/// a function should be executed from the workarea
bool workAreaDispatch(FuncRequest const & ev);
/// a function should be executed
@@ -195,6 +193,9 @@ private:
void MenuInsertLyXFile(std::string const & filen);
/// our workarea
WorkArea & workarea() const;
+ /// range of visible main text paragraphs
+ void getVisiblePars(ParagraphList::iterator &, ParagraphList::iterator &);
+
///
LCursor cursor_;
};
Index: bufferview_funcs.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferview_funcs.C,v
retrieving revision 1.123
diff -u -p -r1.123 bufferview_funcs.C
--- bufferview_funcs.C 10 Nov 2003 09:06:34 -0000 1.123
+++ bufferview_funcs.C 10 Nov 2003 13:14:50 -0000
@@ -157,8 +157,7 @@ bool changeDepth(BufferView * bv, LyXTex
return text->changeDepth(type, true);
bool const changed = text->changeDepth(type, false);
- if (text->inset_owner)
- bv->updateInset(text->inset_owner);
+ bv->update();
return changed;
}
Index: cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/cursor.C,v
retrieving revision 1.16
diff -u -p -r1.16 cursor.C
--- cursor.C 10 Nov 2003 09:06:34 -0000 1.16
+++ cursor.C 10 Nov 2003 13:14:50 -0000
@@ -74,7 +74,7 @@ DispatchResult LCursor::dispatch(FuncReq
lyxerr << "trying to dispatch to inset " << citem.inset_ << endl;
DispatchResult res = citem.inset_->dispatch(cmd);
if (res.update())
- bv_->updateInset(citem.inset_);
+ bv_->update();
if (res.dispatched()) {
lyxerr << " successfully dispatched to inset " << citem.inset_
<< endl;
return DispatchResult(true, true);
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.496
diff -u -p -r1.496 text2.C
--- text2.C 10 Nov 2003 10:21:11 -0000 1.496
+++ text2.C 10 Nov 2003 13:14:50 -0000
@@ -273,7 +273,7 @@ void LyXText::toggleInset()
else
inset->open(bv());
- bv()->updateInset(inset);
+ bv()->update();
}
@@ -724,8 +724,7 @@ void LyXText::setParagraph(
setCursor(selection.end.par(), selection.end.pos());
setSelection();
setCursor(tmpcursor.par(), tmpcursor.pos());
- if (inset_owner)
- bv()->updateInset(inset_owner);
+ bv()->update();
}
Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.172
diff -u -p -r1.172 text3.C
--- text3.C 10 Nov 2003 11:26:33 -0000 1.172
+++ text3.C 10 Nov 2003 13:14:50 -0000
@@ -267,12 +267,12 @@ InsetOld * LyXText::checkInsetHit(int &
InsetList::iterator iend = pit->insetlist.end();
for ( ; iit != iend; ++iit) {
InsetOld * inset = iit->inset;
- lyxerr << "examining inset " << inset
- << " xy: " << inset->x() << "/" << inset->y()
- << " x: " << inset->x() << "..." << inset->x() +
inset->width()
- << " y: " << inset->y() - inset->ascent() << "..."
- << inset->y() + inset->descent()
- << endl;
+ //lyxerr << "examining inset " << inset
+ // << " xy: " << inset->x() << "/" << inset->y()
+ // << " x: " << inset->x() << "..." << inset->x() +
inset->width()
+ // << " y: " << inset->y() - inset->ascent() << "..."
+ // << inset->y() + inset->descent()
+ // << endl;
if (x >= inset->x()
&& x <= inset->x() + inset->width()
&& y >= inset->y() - inset->ascent()
@@ -471,7 +471,7 @@ void specialChar(LyXText * lt, BufferVie
if (!bv->insertInset(new_inset))
delete new_inset;
else
- bv->updateInset(new_inset);
+ bv->update();
}
Index: frontends/LyXView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/LyXView.C,v
retrieving revision 1.38
diff -u -p -r1.38 LyXView.C
--- frontends/LyXView.C 14 Oct 2003 21:30:20 -0000 1.38
+++ frontends/LyXView.C 10 Nov 2003 13:14:50 -0000
@@ -199,7 +199,7 @@ Buffer const * const LyXView::updateInse
Buffer const * buffer_ptr = 0;
if (inset) {
buffer_ptr = bufferview_->buffer();
- bufferview_->updateInset(inset);
+ bufferview_->update();
}
return buffer_ptr;
}
Index: insets/insetbibitem.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbibitem.C,v
retrieving revision 1.40
diff -u -p -r1.40 insetbibitem.C
--- insets/insetbibitem.C 4 Nov 2003 12:36:54 -0000 1.40
+++ insets/insetbibitem.C 10 Nov 2003 13:14:51 -0000
@@ -75,7 +75,7 @@ InsetBibitem::priv_dispatch(FuncRequest
if (p.getCmdName().empty())
return DispatchResult(true, true);
setParams(p);
- cmd.view()->updateInset(this);
+ cmd.view()->update();
cmd.view()->fitCursor();
return DispatchResult(true, true);
}
Index: insets/insetbox.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbox.C,v
retrieving revision 1.10
diff -u -p -r1.10 insetbox.C
--- insets/insetbox.C 10 Nov 2003 09:06:41 -0000 1.10
+++ insets/insetbox.C 10 Nov 2003 13:14:51 -0000
@@ -180,7 +180,6 @@ InsetBox::priv_dispatch(FuncRequest cons
lyxerr << "InsetBox::dispatch MODIFY" << endl;
InsetBoxMailer::string2params(cmd.argument, params_);
setButtonLabel();
- bv->updateInset(this);
result.dispatched(true);
result.update(true);
return result;
Index: insets/insetbranch.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbranch.C,v
retrieving revision 1.30
diff -u -p -r1.30 insetbranch.C
--- insets/insetbranch.C 5 Nov 2003 12:06:07 -0000 1.30
+++ insets/insetbranch.C 10 Nov 2003 13:14:51 -0000
@@ -128,7 +128,6 @@ InsetBranch::priv_dispatch(FuncRequest c
InsetBranchMailer::string2params(cmd.argument, params);
params_.branch = params.branch;
setButtonLabel();
- bv->updateInset(this);
return DispatchResult(true, true);
}
Index: insets/insetcollapsable.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v
retrieving revision 1.200
diff -u -p -r1.200 insetcollapsable.C
--- insets/insetcollapsable.C 10 Nov 2003 11:26:33 -0000 1.200
+++ insets/insetcollapsable.C 10 Nov 2003 13:14:51 -0000
@@ -205,7 +205,6 @@ DispatchResult InsetCollapsable::lfunMou
collapsed_ = false;
edit(bv, true);
bv->buffer()->markDirty();
- bv->updateInset(this);
bv->update();
return result;
}
@@ -221,7 +220,7 @@ DispatchResult InsetCollapsable::lfunMou
return result;
}
result.update(true);
- bv->updateInset(this);
+ bv->update();
bv->buffer()->markDirty();
} else if (!collapsed_ && cmd.y > button_dim.y2) {
lyxerr << "InsetCollapsable::lfunMouseRelease 3" << endl;
@@ -283,7 +282,7 @@ void InsetCollapsable::edit(BufferView *
collapsed_ = false;
// set this only here as it should be recollapsed only if
// it was already collapsed!
- bv->updateInset(this);
+ bv->update();
bv->buffer()->markDirty();
inset.edit(bv, x, y);
} else {
@@ -401,7 +400,7 @@ void InsetCollapsable::open(BufferView *
return;
collapsed_ = false;
- bv->updateInset(this);
+ bv->update();
}
@@ -411,7 +410,7 @@ void InsetCollapsable::close(BufferView
return;
collapsed_ = true;
- bv->updateInset(this);
+ bv->update();
}
Index: insets/insetcommand.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcommand.C,v
retrieving revision 1.101
diff -u -p -r1.101 insetcommand.C
--- insets/insetcommand.C 5 Nov 2003 12:06:07 -0000 1.101
+++ insets/insetcommand.C 10 Nov 2003 13:14:51 -0000
@@ -99,7 +99,7 @@ InsetCommand::priv_dispatch(FuncRequest
return DispatchResult(false);
setParams(p);
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/insetert.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v
retrieving revision 1.172
diff -u -p -r1.172 insetert.C
--- insets/insetert.C 10 Nov 2003 09:06:41 -0000 1.172
+++ insets/insetert.C 10 Nov 2003 13:14:51 -0000
@@ -427,7 +427,7 @@ InsetERT::priv_dispatch(FuncRequest cons
InsetERT::ERTStatus status_;
InsetERTMailer::string2params(cmd.argument, status_);
status(bv, status_);
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
@@ -561,7 +561,7 @@ void InsetERT::status(BufferView * bv, E
break;
}
if (bv) {
- bv->updateInset(this);
+ bv->update();
bv->buffer()->markDirty();
}
}
Index: insets/insetexternal.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetexternal.C,v
retrieving revision 1.132
diff -u -p -r1.132 insetexternal.C
--- insets/insetexternal.C 5 Nov 2003 12:06:07 -0000 1.132
+++ insets/insetexternal.C 10 Nov 2003 13:14:51 -0000
@@ -449,7 +449,7 @@ InsetExternal::priv_dispatch(FuncRequest
InsetExternalParams p;
InsetExternalMailer::string2params(cmd.argument, buffer, p);
setParams(p, buffer);
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/insetfloat.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfloat.C,v
retrieving revision 1.112
diff -u -p -r1.112 insetfloat.C
--- insets/insetfloat.C 10 Nov 2003 09:06:41 -0000 1.112
+++ insets/insetfloat.C 10 Nov 2003 13:14:51 -0000
@@ -175,7 +175,7 @@ InsetFloat::priv_dispatch(FuncRequest co
params_.wide = params.wide;
wide(params_.wide, cmd.view()->buffer()->params());
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/insetgraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.228
diff -u -p -r1.228 insetgraphics.C
--- insets/insetgraphics.C 5 Nov 2003 12:06:10 -0000 1.228
+++ insets/insetgraphics.C 10 Nov 2003 13:14:51 -0000
@@ -201,7 +201,7 @@ InsetGraphics::priv_dispatch(FuncRequest
InsetGraphicsMailer::string2params(cmd.argument, buffer, p);
if (!p.filename.empty()) {
setParams(p);
- cmd.view()->updateInset(this);
+ cmd.view()->update();
}
return DispatchResult(true, true);
}
Index: insets/insetinclude.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetinclude.C,v
retrieving revision 1.174
diff -u -p -r1.174 insetinclude.C
--- insets/insetinclude.C 5 Nov 2003 12:06:15 -0000 1.174
+++ insets/insetinclude.C 10 Nov 2003 13:14:51 -0000
@@ -118,7 +118,7 @@ InsetInclude::priv_dispatch(FuncRequest
InsetIncludeMailer::string2params(cmd.argument, p);
if (!p.getCmdName().empty()) {
set(p, *cmd.view()->buffer());
- cmd.view()->updateInset(this);
+ cmd.view()->update();
}
return DispatchResult(true, true);
}
Index: insets/insetlabel.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetlabel.C,v
retrieving revision 1.85
diff -u -p -r1.85 insetlabel.C
--- insets/insetlabel.C 5 Nov 2003 12:06:16 -0000 1.85
+++ insets/insetlabel.C 10 Nov 2003 13:14:51 -0000
@@ -83,7 +83,7 @@ InsetLabel::priv_dispatch(FuncRequest co
}
setParams(p);
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
Index: insets/insetminipage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetminipage.C,v
retrieving revision 1.105
diff -u -p -r1.105 insetminipage.C
--- insets/insetminipage.C 10 Nov 2003 09:06:41 -0000 1.105
+++ insets/insetminipage.C 10 Nov 2003 13:14:51 -0000
@@ -106,7 +106,7 @@ InsetMinipage::priv_dispatch(FuncRequest
InsetMinipageMailer::string2params(cmd.argument, params);
params_.pos = params.pos;
params_.width = params.width;
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/insetnote.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetnote.C,v
retrieving revision 1.64
diff -u -p -r1.64 insetnote.C
--- insets/insetnote.C 5 Nov 2003 12:06:16 -0000 1.64
+++ insets/insetnote.C 10 Nov 2003 13:14:51 -0000
@@ -141,7 +141,7 @@ InsetNote::priv_dispatch(FuncRequest con
case LFUN_INSET_MODIFY: {
InsetNoteMailer::string2params(cmd.argument, params_);
setButtonLabel();
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
Index: insets/insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.371
diff -u -p -r1.371 insettabular.C
--- insets/insettabular.C 10 Nov 2003 09:06:42 -0000 1.371
+++ insets/insettabular.C 10 Nov 2003 13:14:51 -0000
@@ -378,7 +378,7 @@ string const InsetTabular::editMessage()
void InsetTabular::updateLocal(BufferView * bv) const
{
- bv->updateInset(this);
+ bv->update();
resetPos(bv);
}
@@ -522,7 +522,7 @@ InsetTabular::priv_dispatch(FuncRequest
scroll(cmd.view(),
static_cast<float>(strToDbl(cmd.argument)));
else
scroll(cmd.view(), strToInt(cmd.argument));
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/insettext.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.534
diff -u -p -r1.534 insettext.C
--- insets/insettext.C 10 Nov 2003 09:06:46 -0000 1.534
+++ insets/insettext.C 10 Nov 2003 13:14:51 -0000
@@ -290,7 +290,7 @@ void InsetText::updateLocal(BufferView *
text_.selection.cursor = text_.cursor;
bv->fitCursor();
- bv->updateInset(this);
+ bv->update();
bv->owner()->view_state_changed();
bv->owner()->updateMenubar();
bv->owner()->updateToolbar();
Index: insets/insetwrap.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetwrap.C,v
retrieving revision 1.55
diff -u -p -r1.55 insetwrap.C
--- insets/insetwrap.C 10 Nov 2003 09:06:47 -0000 1.55
+++ insets/insetwrap.C 10 Nov 2003 13:14:51 -0000
@@ -91,7 +91,7 @@ InsetWrap::priv_dispatch(FuncRequest con
params_.placement = params.placement;
params_.width = params.width;
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: insets/updatableinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/updatableinset.C,v
retrieving revision 1.35
diff -u -p -r1.35 updatableinset.C
--- insets/updatableinset.C 10 Nov 2003 09:06:47 -0000 1.35
+++ insets/updatableinset.C 10 Nov 2003 13:14:51 -0000
@@ -99,7 +99,7 @@ UpdatableInset::priv_dispatch(FuncReques
scroll(cmd.view(),
static_cast<float>(strToDbl(cmd.argument)));
else
scroll(cmd.view(), strToInt(cmd.argument));
- cmd.view()->updateInset(this);
+ cmd.view()->update();
return DispatchResult(true, true);
}
Index: mathed/formulabase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.308
diff -u -p -r1.308 formulabase.C
--- mathed/formulabase.C 10 Nov 2003 09:06:48 -0000 1.308
+++ mathed/formulabase.C 10 Nov 2003 13:14:51 -0000
@@ -155,15 +155,13 @@ string const InsetFormulaBase::editMessa
void InsetFormulaBase::insetUnlock(BufferView * bv)
{
if (mathcursor) {
- if (mathcursor->inMacroMode()) {
+ if (mathcursor->inMacroMode())
mathcursor->macroModeClose();
- bv->updateInset(this);
- }
releaseMathCursor(bv);
}
if (bv->buffer())
generatePreview(*bv->buffer());
- bv->updateInset(this);
+ bv->update();
}
@@ -209,7 +207,7 @@ void InsetFormulaBase::fitInsetCursor(Bu
void InsetFormulaBase::toggleInsetSelection(BufferView * bv)
{
if (mathcursor)
- bv->updateInset(this);
+ bv->update();
}
@@ -219,7 +217,7 @@ DispatchResult InsetFormulaBase::lfunMou
return DispatchResult(false);
BufferView * bv = cmd.view();
- bv->updateInset(this);
+ bv->update();
//lyxerr << "lfunMouseRelease: buttons: " << cmd.button() << endl;
if (cmd.button() == mouse_button::button3) {
@@ -238,7 +236,7 @@ DispatchResult InsetFormulaBase::lfunMou
mathcursor->selClear();
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
mathcursor->insert(ar);
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
@@ -285,7 +283,7 @@ DispatchResult InsetFormulaBase::lfunMou
return DispatchResult(true, true);
}
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
@@ -313,7 +311,7 @@ DispatchResult InsetFormulaBase::lfunMou
BufferView * bv = cmd.view();
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
- bv->updateInset(this);
+ bv->update();
return DispatchResult(true, true);
}
@@ -326,7 +324,7 @@ void InsetFormulaBase::edit(BufferView *
bv->cursor().push(this);
// if that is removed, we won't get the magenta box when entering an
// inset for the first time
- bv->updateInset(this);
+ bv->update();
}
@@ -340,7 +338,7 @@ void InsetFormulaBase::edit(BufferView *
bv->cursor().push(this);
// if that is removed, we won't get the magenta box when entering an
// inset for the first time
- bv->updateInset(this);
+ bv->update();
}
@@ -739,7 +737,7 @@ InsetFormulaBase::priv_dispatch(FuncRequ
}
if (result == DispatchResult(true, true))
- bv->updateInset(this);
+ bv->update();
mathcursor->normalize();
mathcursor->touch();
@@ -862,7 +860,7 @@ bool InsetFormulaBase::searchForward(Buf
mathcursor->setSelection(it, ar.size());
current = it;
it.jump(ar.size());
- bv->updateInset(this);
+ bv->update();
return true;
}
}