}
+void BufferView::update(UpdateCodes f)
+{
+ pimpl_->update(f);
+}
+
+
void BufferView::switchKeyMap()
{
pimpl_->switchKeyMap();
beforeChange(text);
text->setCursor(it.getPar(), it.getPos());
text->selection.cursor = text->cursor;
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ update(text, BufferView::SELECT);
return true;
}
}
owner()->message(_("Undo"));
hideCursor();
beforeChange(text);
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ update(text, BufferView::SELECT);
if (!textUndo(this))
owner()->message(_("No further undo information"));
else
- update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(text, BufferView::SELECT);
switchKeyMap();
}
owner()->message(_("Redo"));
hideCursor();
beforeChange(text);
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ update(text, BufferView::SELECT);
if (!textRedo(this))
owner()->message(_("No further redo information"));
else
- update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(text, BufferView::SELECT);
switchKeyMap();
}
if (available()) {
text->pasteEnvironmentType();
owner()->message(_("Paragraph environment type set"));
- update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(text, BufferView::SELECT);
}
}
text->selection.cursor = cur;
text->selectSelectedWord();
toggleSelection(false);
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ update(text, BufferView::SELECT);
}
beforeChange(text);
text->selectSelectedWord();
text->clearSelection();
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ update(text, BufferView::SELECT);
}
LyXText * tt = getLyXText();
hideCursor();
- update(tt, BufferView::SELECT|BufferView::FITCUR);
+ update(tt, BufferView::SELECT);
// clear the selection (if there is any)
toggleSelection(false);
- update(tt, BufferView::SELECT|BufferView::FITCUR);
+ update(tt, BufferView::SELECT);
// clear the selection (if there is any)
toggleSelection(false);
for (string::size_type i = 0; i < replacestring.length() + 1; ++i) {
tt->cursorLeft(this);
}
- update(tt, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(tt, BufferView::SELECT);
+
+ // FIXME: should be done through LFUN
+ buffer()->markDirty();
+ fitCursor();
}
// End of spellchecker stuff
}
-void BufferView::updateInset(Inset * inset, bool mark_dirty)
+void BufferView::updateInset(Inset * inset)
{
- pimpl_->updateInset(inset, mark_dirty);
+ pimpl_->updateInset(inset);
}
* of the document rendering.
*/
enum UpdateCodes {
- UPDATE = 0, //< FIXME
- SELECT = 1, //< selection change
- FITCUR = 2, //< the cursor needs fitting into the view
- CHANGE = 4 //< document data has changed
+ UPDATE = 0, //< repaint
+ SELECT = 1 //< reset selection to current cursor pos
};
/**
void update();
// update for a particular lyxtext
void update(LyXText *, UpdateCodes uc);
+ /// update for the top-level lyxtext
+ void update(UpdateCodes uc);
/// update for a particular inset
- void updateInset(Inset * inset, bool mark_dirty);
+ void updateInset(Inset * inset);
/// reset the scrollbar to reflect current view position
void updateScrollbar();
/// FIXME
}
}
-// Values used when calling update:
-// -3 - update
-// -2 - update, move sel_cursor if selection, fitcursor
-// -1 - update, move sel_cursor if selection, fitcursor, mark dirty
-// 0 - update, move sel_cursor if selection, fitcursor
-// 1 - update, move sel_cursor if selection, fitcursor, mark dirty
-// 3 - update, move sel_cursor if selection
-//
-// update -
-// a simple redraw of the parts that need refresh
-//
-// move sel_cursor if selection -
-// the text's sel_cursor is moved if there is selection is progress
-//
-// fitcursor -
-// fitCursor() is called and the scrollbar updated
-//
-// mark dirty -
-// the buffer is marked dirty.
-//
-// enum {
-// UPDATE = 0,
-// SELECT = 1,
-// FITCUR = 2,
-// CHANGE = 4
-// };
-//
-// UPDATE_ONLY = UPDATE;
-// UPDATE_SELECT = UPDATE | SELECT;
-// UPDATE_SELECT_MOVE = UPDATE | SELECT | FITCUR;
-// UPDATE_SELECT_MOVE_AFTER_CHANGE = UPDATE | SELECT | FITCUR | CHANGE;
-//
-// update(-3) -> update(0) -> update(0) -> update(UPDATE)
-// update(-2) -> update(1 + 2) -> update(3) -> update(SELECT|FITCUR)
-// update(-1) -> update(1 + 2 + 4) -> update(7) -> update(SELECT|FITCUR|CHANGE)
-// update(1) -> update(1 + 2 + 4) -> update(7) -> update(SELECT|FITCUR|CHANGE)
-// update(3) -> update(1) -> update(1) -> update(SELECT)
void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
{
if (text->inset_owner) {
text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
- updateInset(text->inset_owner, false);
+ updateInset(text->inset_owner);
} else {
update();
}
+}
+
+
+void BufferView::Pimpl::update(BufferView::UpdateCodes f)
+{
+ LyXText * text = bv_->text;
- if ((f & FITCUR)) {
- fitCursor();
+ if (!text->selection.set() && (f & SELECT)) {
+ text->selection.cursor = text->cursor;
}
- if ((f & CHANGE)) {
- buffer_->markDirty();
+ text->fullRebreak();
+
+ if (text->inset_owner) {
+ text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
+ updateInset(text->inset_owner);
+ } else {
+ update();
}
}
bv_->text->setCursor(par,
min(par->size(), saved_positions[i].par_pos));
- update(bv_->text, BufferView::SELECT | BufferView::FITCUR);
+ update(BufferView::SELECT);
if (i > 0) {
ostringstream str;
#if USE_BOOST_FORMAT
new_y = t->cursor.y() - half_height;
}
+ // FIXME: look at this comment again ...
+
// FIXME: can we do this w/o calling screen directly ?
// This updates top_y() but means the fitCursor() call
// from the update(FITCUR) doesn't realise that we might
// pretty obfuscated way of updating t->top_y()
screen().draw(t, bv_, new_y);
- update(t, BufferView::SELECT | BufferView::FITCUR);
+ update(BufferView::SELECT);
}
// we cannot allow undos beyond the freeze point
buf->undostack.clear();
} else {
- bv_->update(bv_->text, BufferView::SELECT | BufferView::FITCUR);
+ update(BufferView::SELECT);
bv_->text->setCursor(&(*buf->paragraphs.begin()), 0);
#warning changes FIXME
//moveCursorUpdate(false);
owner_->getLyXFunc().handleKeyFunc(ev.action);
owner_->getIntl().getTransManager()
.TranslateAndInsert(ev.argument[0], bv_->getLyXText());
- update(bv_->getLyXText(),
- BufferView::SELECT
- | BufferView::FITCUR
- | BufferView::CHANGE);
+ update(bv_->getLyXText(), BufferView::SELECT);
}
break;
} else {
Inset * inset = createInset(ev);
if (inset && insertInset(inset)) {
- updateInset(inset, true);
+ updateInset(inset);
} else {
delete inset;
}
break;
case LFUN_ACCEPT_ALL_CHANGES: {
- bv_->update(bv_->text, BufferView::SELECT | BufferView::FITCUR);
+ update(BufferView::SELECT);
bv_->text->setCursor(&(*bv_->buffer()->paragraphs.begin()), 0);
#warning FIXME changes
//moveCursorUpdate(false);
while (lyxfind::findNextChange(bv_)) {
bv_->getLyXText()->acceptChange();
}
- update(bv_->text,
- BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+ update(BufferView::SELECT);
break;
}
case LFUN_REJECT_ALL_CHANGES: {
- bv_->update(bv_->text, BufferView::SELECT | BufferView::FITCUR);
+ update(BufferView::SELECT);
bv_->text->setCursor(&(*bv_->buffer()->paragraphs.begin()), 0);
#warning FIXME changes
//moveCursorUpdate(false);
while (lyxfind::findNextChange(bv_)) {
bv_->getLyXText()->rejectChange();
}
- update(bv_->text,
- BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+ update(BufferView::SELECT);
break;
}
case LFUN_ACCEPT_CHANGE: {
bv_->getLyXText()->acceptChange();
- update(bv_->text,
- BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+ update(BufferView::SELECT);
break;
}
case LFUN_REJECT_CHANGE: {
bv_->getLyXText()->rejectChange();
- update(bv_->text,
- BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+ update(BufferView::SELECT);
break;
}
beforeChange(bv_->text);
if (!lout.empty()) {
- update(bv_->text, BufferView::SELECT|BufferView::FITCUR);
+ update(BufferView::SELECT);
bv_->text->breakParagraph(bv_->buffer()->paragraphs);
- update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(BufferView::SELECT);
if (!bv_->text->cursor.par()->empty()) {
bv_->text->cursorLeft(bv_);
bv_->text->breakParagraph(bv_->buffer()->paragraphs);
- update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(BufferView::SELECT);
}
string lres = lout;
LYX_ALIGN_LAYOUT,
string(),
0);
- update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(BufferView::SELECT);
}
bv_->text->insertInset(inset);
- update(bv_->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ update(BufferView::SELECT);
unFreezeUndo();
return true;
}
-void BufferView::Pimpl::updateInset(Inset * inset, bool mark_dirty)
+void BufferView::Pimpl::updateInset(Inset * inset)
{
if (!inset || !available())
return;
if (bv_->theLockingInset() == inset) {
if (bv_->text->updateInset(inset)) {
update();
- if (mark_dirty) {
- buffer_->markDirty();
- }
updateScrollbar();
return;
}
} else if (bv_->theLockingInset()->updateInsetInInset(bv_, inset)) {
if (bv_->text->updateInset(bv_->theLockingInset())) {
update();
- if (mark_dirty) {
- buffer_->markDirty();
- }
updateScrollbar();
return;
}
tl_inset = tl_inset->owner();
hideCursor();
if (tl_inset == inset) {
- update(bv_->text, BufferView::UPDATE);
+ update(BufferView::UPDATE);
if (bv_->text->updateInset(inset)) {
- if (mark_dirty) {
- update(bv_->text,
- BufferView::SELECT
- | BufferView::FITCUR
- | BufferView::CHANGE);
- } else {
- update(bv_->text, SELECT);
- }
+ update(BufferView::SELECT);
return;
}
} else if (static_cast<UpdatableInset *>(tl_inset)
void update();
//
void update(LyXText *, BufferView::UpdateCodes);
+ /// update the toplevel lyx text
+ void update(BufferView::UpdateCodes);
/**
* Repaint pixmap. Used for when we've made a visible
* change but don't need the full update() logic
///
bool insertInset(Inset * inset, string const & lout = string());
///
- void updateInset(Inset * inset, bool mark_dirty);
+ void updateInset(Inset * inset);
///
bool dispatch(FuncRequest const & ev);
private:
+2003-03-19 John Levon <levon@movementarian.org>
+
+ * lyxfunc.C: mark buffer dirty if we executed a "dirtying" lfun.
+ fit the cursor after an lfun
+
+ * BufferView.h:
+ * BufferView.C:
+ * BufferView_pimpl.h:
+ * BufferView_pimpl.C: remove BufferView::FITCUR/CHANGE
+
+ * LyXAction.C: layout-character should have ReadOnly
+
+ * ParagraphParameters.C:
+ * buffer.C:
+ * bufferview_funcs.C:
+ * lyx_cb.C:
+ * lyxfind.C:
+ * lyxtext.h:
+ * text.C:
+ * text2.C:
+ * text3.C:
+ * undo_funcs.C: changes from above
+
2003-03-18 John Levon <levon@movementarian.org>
* BufferView_pimpl.C (scrollDocView): add updateLayoutChoice(),
{ LFUN_LATEX_LOG, "latex-view-log", N_("View LaTeX log"),
ReadOnly },
{ LFUN_LAYOUT, "layout", "", Noop },
- { LFUN_LAYOUT_CHARACTER, "layout-character", "", Noop },
+ { LFUN_LAYOUT_CHARACTER, "layout-character", "", ReadOnly },
{ LFUN_LAYOUT_COPY, "layout-copy",
N_("Copy paragraph environment type"), Noop },
{ LFUN_LAYOUT_DOCUMENT, "layout-document", "", ReadOnly },
params.noindent());
// Actually apply these settings
- bv.update(text,
- BufferView::SELECT |
- BufferView::FITCUR |
- BufferView::CHANGE);
-
- bv.buffer()->markDirty();
+ bv.update(text, BufferView::SELECT);
bv.owner()->message(_("Paragraph layout set"));
}
} else {
// We are inserting into an existing document
users->text->breakParagraph(paragraphs);
- markDirty();
// We don't want to adopt the parameters from the
// document we insert, so read them into a temporary buffer
{
toggleAndShow(bv, freefont, toggleall);
bv->owner()->view_state_changed();
- bv->buffer()->markDirty();
bv->owner()->message(_("Character set"));
}
return;
bv->hideCursor();
- bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(BufferView::SELECT);
if (decInc >= 0)
text->incDepth();
else
text->decDepth();
if (text->inset_owner)
- bv->updateInset((Inset *)text->inset_owner, true);
- bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ bv->updateInset((Inset *)text->inset_owner);
+ bv->update(BufferView::SELECT);
}
return;
bv->hideCursor();
- bv->update(text, BufferView::SELECT | BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
text->toggleFree(font, toggleall);
- bv->update(text, BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
+ bv->update(text, BufferView::SELECT);
if (font.language() != ignore_language ||
font.number() != LyXFont::IGNORE) {
pimage_ = &pimage;
if (view())
- view()->updateInset(&inset_, false);
+ view()->updateInset(&inset_);
}
} // namespace grfx
+2003-03-19 John Levon <levon@movementarian.org>
+
+ * several files: bv->updateInset() doesn't take
+ a bool mark_dirty any more
+
2003-03-17 Lars Gullik Bjønnes <larsbj@gullik.net>
* adjust for BufferView* arg removal from lyxtext.
}
setParams(p);
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
}
setParams(p);
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
#include "lyxtext.h"
#include "WordLangTuple.h"
#include "funcrequest.h"
+#include "buffer.h"
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
first_after_edit = true;
if (!bv->lockInset(this))
return;
- bv->updateInset(this, false);
+ bv->updateInset(this);
+ bv->buffer()->markDirty();
inset.edit(bv);
} else {
if (!bv->lockInset(this))
if (!bv->lockInset(this))
return;
inset.setUpdateStatus(bv, InsetText::FULL);
- bv->updateInset(this, false);
+ bv->updateInset(this);
+ bv->buffer()->markDirty();
inset.edit(bv, front);
first_after_edit = true;
} else {
inset.insetUnlock(bv);
if (scroll())
scroll(bv, 0.0F);
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
// should not be called on inset open!
// inset.insetButtonRelease(bv, 0, 0, button);
inset.setUpdateStatus(bv, InsetText::FULL);
- bv->updateInset(this, false);
+ bv->updateInset(this);
+ bv->buffer()->markDirty();
} else {
collapsed_ = true;
bv->unlockInset(this);
- bv->updateInset(this, false);
+ bv->updateInset(this);
+ bv->buffer()->markDirty();
}
} else if (!collapsed_ && (cmd.y > button_bottom_y)) {
LyXFont font(LyXFont::ALL_SANE);
if (!collapsed_) return;
collapsed_ = false;
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
return;
collapsed_ = true;
- bv->updateInset(const_cast<InsetCollapsable *>(this), false);
+ bv->updateInset(const_cast<InsetCollapsable *>(this));
}
break;
setParams(p);
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
InsetERTMailer::string2params(cmd.argument, status_);
status(bv, status_);
- bv->updateInset(this, true);
+ bv->updateInset(this);
result = DISPATCHED;
}
break;
bv->unlockInset(const_cast<InsetERT *>(this));
break;
}
- if (bv)
- bv->updateInset(const_cast<InsetERT *>(this), false);
+ if (bv) {
+ bv->updateInset(const_cast<InsetERT *>(this));
+ bv->buffer()->markDirty();
+ }
}
}
break;
setFromParams(p);
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
params_.placement = params.placement;
params_.wide = params.wide;
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
string const filepath = cmd.view()->buffer()->filePath();
setParams(p, filepath);
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
void InsetGraphics::statusChanged()
{
if (!cache_->view.expired())
- cache_->view.lock()->updateInset(this, false);
+ cache_->view.lock()->updateInset(this);
}
set(p);
params_.masterFilename_ = cmd.view()->buffer()->fileName();
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
lyxerr << "restartLoading()" << std::endl;
removePreview();
if (view())
- view()->updateInset(&parent(), false);
+ view()->updateInset(&parent());
generatePreview();
}
}
setParams(p);
- cmd.view()->updateInset(this, !clean);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
params_.pos = params.pos;
params_.width = params.width;
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
need_update = what;
// Dirty Cast! (Lgb)
if (need_update != NONE) {
- bv->updateInset(const_cast<InsetTabular *>(this), mark_dirty);
+ bv->updateInset(const_cast<InsetTabular *>(this));
if (locked)
resetPos(bv);
}
bv->fitCursor();
#endif
if (flag)
- bv->updateInset(const_cast<InsetText *>(this), mark_dirty);
+ bv->updateInset(const_cast<InsetText *>(this));
if (need_update == CURSOR)
need_update = NONE;
params_.placement = params.placement;
params_.width = params.width;
- cmd.view()->updateInset(this, true);
+ cmd.view()->updateInset(this);
result = DISPATCHED;
}
break;
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
scx += offset;
}
}
-// bv->updateInset(const_cast<UpdatableInset *>(this), false);
}
int const xx = strToInt(ev.argument);
scroll(ev.view(), xx);
}
- ev.view()->updateInset(this, false);
+ ev.view()->updateInset(this);
return DISPATCHED;
}
else
bv->getLyXText()->insertStringAsParagraphs(tmpstr);
if (flag)
- bv->update(bv->text,
- BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ bv->update(BufferView::SELECT);
}
(text->inset_owner == text->inset_owner->getLockingInset())))
{
bv->hideCursor();
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
bv->toggleSelection(false);
text->replaceSelectionWithString(replacestr);
text->setSelectionRange(replacestr.length());
- bv->update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ bv->update(text, BufferView::SELECT);
++replace_count;
}
if (!once)
found = LyXFind(bv, searchstr, fw, casesens, matchwrd);
} while (!once && replaceall && found);
+ // FIXME: should be called via an LFUN
+ bv->buffer()->markDirty();
+ bv->fitCursor();
+
return replace_count;
}
return false;
bv->hideCursor();
- bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR);
+ bv->update(bv->getLyXText(), BufferView::SELECT);
if (bv->theLockingInset()) {
bool found = forward ?
// inset did it already.
if (result == SR_FOUND) {
bv->unlockInset(bv->theLockingInset());
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
text->setSelectionRange(searchstr.length());
bv->toggleSelection(false);
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
} else if (result == SR_NOT_FOUND) {
bv->unlockInset(bv->theLockingInset());
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
found = false;
}
+ bv->fitCursor();
+
return found;
}
return false;
bv->hideCursor();
- bv->update(bv->getLyXText(), BufferView::SELECT | BufferView::FITCUR);
+ bv->update(bv->getLyXText(), BufferView::SELECT);
pos_type length;
// inset did it already.
if (result == SR_FOUND) {
bv->unlockInset(bv->theLockingInset());
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
text->setSelectionRange(length);
bv->toggleSelection(false);
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
} else if (result == SR_NOT_FOUND) {
bv->unlockInset(bv->theLockingInset());
- bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(text, BufferView::SELECT);
found = false;
}
+ bv->fitCursor();
+
return found;
}
if (!TEXT(flag)->isInInset())
view()->toggleToggle();
}
- view()->update(TEXT(flag), BufferView::SELECT|BufferView::FITCUR);
+ view()->update(TEXT(flag), BufferView::SELECT);
view()->showCursor();
view()->switchKeyMap();
// actions
keyseq.clear();
// copied verbatim from do_accent_char
- view()->update(TEXT(false),
- BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ view()->update(TEXT(false), BufferView::SELECT);
TEXT(false)->selection.cursor = TEXT(false)->cursor;
}
moveCursorUpdate(true, false);
owner->view_state_changed();
} else {
- view()->update(TEXT(), BufferView::SELECT|BufferView::FITCUR);
+ view()->update(TEXT(), BufferView::SELECT);
}
goto exit_with_message;
} else if (result == FINISHED_DOWN) {
case LFUN_PREFIX:
{
if (view()->available() && !view()->theLockingInset()) {
- view()->update(TEXT(),
- BufferView::SELECT|BufferView::FITCUR);
+ view()->update(TEXT(), BufferView::SELECT);
}
owner->message(keyseq.printOptions());
}
} // end of switch
view()->owner()->updateLayoutChoice();
+ view()->fitCursor();
+
+ // If we executed a mutating lfun, mark the buffer as dirty
+ if (!lyxaction.funcHasFlag(ev.action, LyXAction::NoBuffer)
+ && !lyxaction.funcHasFlag(ev.action, LyXAction::ReadOnly))
+ view()->buffer()->markDirty();
exit_with_message:
sendDispatchMessage(getMessage(), ev, verbose);
* with a dynamic left margin will be rebroken. */
void updateCounters();
///
- void update(bool changed = true);
+ void update();
/**
* Returns an inset if inset was hit, or 0 if not.
* If hit, the coordinates are changed relative to the inset.
+2003-03-19 John Levon <levon@movementarian.org>
+
+ * formulabase.h:
+ * formulabase.C:
+ * math_gridinset.C:
+ * math_hullinset.C:
+ * ref_inset.C: updateInset() doesn't take a bool
+ anymore
+
2003-03-17 John Levon <levon@movementarian.org>
* formula.h:
bv->lockedInsetStoreUndo(Undo::EDIT);
if (mathcursor->par()->name() == font) {
mathcursor->handleFont(font);
- updateLocal(bv, true);
+ bv->updateInset(this);
} else {
bool sel = mathcursor->selection();
if (sel)
- updateLocal(bv, true);
+ bv->updateInset(this);
mathcursor->handleNest(createMathInset(font));
mathcursor->insert(arg);
if (!sel)
- updateLocal(bv, false);
+ bv->updateInset(this);
}
}
mathcursor->setPos(x + xo_, y + yo_);
// if that is removed, we won't get the magenta box when entering an
// inset for the first time
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
releaseMathCursor(bv);
mathcursor = new MathCursor(this, front);
metrics(bv);
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
if (mathcursor) {
if (mathcursor->inMacroMode()) {
mathcursor->macroModeClose();
- updateLocal(bv, true);
+ bv->updateInset(this);
}
releaseMathCursor(bv);
}
generatePreview();
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
void InsetFormulaBase::toggleInsetSelection(BufferView * bv)
{
if (mathcursor)
- bv->updateInset(this, false);
+ bv->updateInset(this);
}
}
-void InsetFormulaBase::updateLocal(BufferView * bv, bool dirty)
-{
- bv->updateInset(this, dirty);
-}
-
-
dispatch_result InsetFormulaBase::lfunMouseRelease(FuncRequest const & cmd)
{
if (!mathcursor)
BufferView * bv = cmd.view();
hideInsetCursor(bv);
showInsetCursor(bv);
- bv->updateInset(this, false);
+ bv->updateInset(this);
//lyxerr << "lfunMouseRelease: buttons: " << cmd.button() << endl;
if (cmd.button() == mouse_button::button3) {
mathcursor->selClear();
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
mathcursor->insert(asArray(bv->getClipboard()));
- bv->updateInset(this, true);
+ bv->updateInset(this);
return DISPATCHED;
}
return DISPATCHED;
}
- bv->updateInset(this, false);
+ bv->updateInset(this);
return DISPATCHED;
}
hideInsetCursor(bv);
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
showInsetCursor(bv);
- bv->updateInset(this, false);
+ bv->updateInset(this);
return DISPATCHED;
}
case LFUN_MATH_LIMITS:
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->dispatch(cmd);
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_RIGHTSEL:
result = mathcursor->right(sel) ? DISPATCHED : FINISHED_RIGHT;
//lyxerr << "calling scroll 20\n";
//scroll(bv, 20);
- updateLocal(bv, false);
+ bv->updateInset(this);
// write something to the minibuffer
//bv->owner()->message(mathcursor->info());
break;
sel = true; // fall through
case LFUN_LEFT:
result = mathcursor->left(sel) ? DISPATCHED : FINISHED;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_UPSEL:
sel = true; // fall through
case LFUN_UP:
result = mathcursor->up(sel) ? DISPATCHED : FINISHED_UP;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_DOWNSEL:
sel = true; // fall through
case LFUN_DOWN:
result = mathcursor->down(sel) ? DISPATCHED : FINISHED_DOWN;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_WORDSEL:
mathcursor->home(false);
mathcursor->end(true);
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_UP_PARAGRAPHSEL:
case LFUN_DOWN_PARAGRAPHSEL:
case LFUN_DOWN_PARAGRAPH:
result = FINISHED;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_HOMESEL:
case LFUN_HOME:
case LFUN_WORDLEFT:
result = mathcursor->home(sel) ? DISPATCHED : FINISHED;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_ENDSEL:
case LFUN_END:
case LFUN_WORDRIGHT:
result = mathcursor->end(sel) ? DISPATCHED : FINISHED_RIGHT;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_PRIORSEL:
case LFUN_BEGINNINGBUFSEL:
case LFUN_BEGINNINGBUF:
result = FINISHED;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_NEXTSEL:
case LFUN_ENDBUFSEL:
case LFUN_ENDBUF:
result = FINISHED_RIGHT;
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_TAB:
mathcursor->idxNext();
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_SHIFT_TAB:
mathcursor->idxPrev();
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
case LFUN_DELETE_WORD_BACKWARD:
result = FINISHED;
remove_inset = true;
}
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_DELETE_WORD_FORWARD:
result = FINISHED;
remove_inset = true;
}
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
// case LFUN_GETXY:
istringstream is(cmd.argument.c_str());
is >> x >> y;
mathcursor->setPos(x, y);
- updateLocal(bv, false);
+ bv->updateInset(this);
break;
}
mathcursor->macroModeClose();
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->selPaste();
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_CUT:
bv->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->selCut();
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_COPY:
// deadkeys
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->script(true);
- updateLocal(bv, true);
+ bv->updateInset(this);
}
break;
case LFUN_MATH_MODE:
if (mathcursor->currentMode() == MathInset::TEXT_MODE) {
mathcursor->niceInsert(MathAtom(new MathHullInset("simple")));
- updateLocal(bv, true);
+ bv->updateInset(this);
} else {
handleFont(bv, cmd.argument, "textrm");
}
if (!arg.empty()) {
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->setSize(arg);
- updateLocal(bv, true);
+ bv->updateInset(this);
}
#endif
break;
v_align += 'c';
mathcursor->niceInsert(
MathAtom(new MathArrayInset("array", m, n, v_align[0], h_align)));
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
}
{
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->script(cmd.action == LFUN_SUPERSCRIPT);
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
}
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->handleNest(MathAtom(new MathDelimInset(ls, rs)));
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
}
case LFUN_MATH_SPACE:
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->insert(MathAtom(new MathSpaceInset(",")));
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_UNDO:
// interpret this as if a backslash was typed
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->interpret('\\');
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_BREAKPARAGRAPH:
case LFUN_INSERT_MATH:
bv->lockedInsetStoreUndo(Undo::EDIT);
mathcursor->niceInsert(argument);
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case -1:
result = mathcursor->interpret(argument[0]) ? DISPATCHED : FINISHED_RIGHT;
else
mathcursor->insert(asArray(argument));
- updateLocal(bv, true);
+ bv->updateInset(this);
}
break;
case LFUN_INSET_TOGGLE:
mathcursor->insetToggle();
- updateLocal(bv, true);
+ bv->updateInset(this);
break;
case LFUN_DIALOG_SHOW_NEW_INSET: {
}
}
if (result == DISPATCHED)
- updateLocal(bv, true);
+ bv->updateInset(this);
}
break;
mathcursor->setSelection(it, ar.size());
current = it;
it.jump(ar.size());
- updateLocal(bv, false);
+ bv->updateInset(this);
return true;
}
}
///
virtual MathAtom & par() = 0;
///
- virtual void updateLocal(BufferView * bv, bool mark_dirty);
- ///
// And shouldn't this really return a shared_ptr<BufferView> instead?
BufferView * view() const;
case LFUN_TABINSERT:
//bv->lockedInsetStoreUndo(Undo::EDIT);
splitCell(idx, pos);
- //updateLocal(bv, true);
return DISPATCHED_POP;
case LFUN_BREAKLINE: {
pos = cell(idx).size();
//mathcursor->normalize();
- //updateLocal(bv, true);
return DISPATCHED_POP;
}
for (row_type row = 0; row < nrows(); ++row)
numbered(row, !old);
//bv->owner()->message(old ? _("No number") : _("Number"));
- //updateLocal(bv, true);
}
return DISPATCHED;
bool old = numbered(r);
//bv->owner()->message(old ? _("No number") : _("Number"));
numbered(r, !old);
- //updateLocal(bv, true);
}
return DISPATCHED;
// if (cmd.view())
// // This does not compile because updateInset expects
// // an Inset* and 'this' isn't.
-// cmd.view()->updateInset(this, true);
+// cmd.view()->updateInset(this);
return DISPATCHED;
}
row && row != anchor_row_; row = row->next()) {
y += row->height();
}
+ lyxerr << "Returning y as " << y << endl;
+ lyxerr << "But row->y is " << anchor_row_->y() << endl;
return y + anchor_row_offset_;
}
setSelection();
setCursor(tmpcursor.par(), tmpcursor.pos());
if (inset_owner)
- bv()->updateInset(inset_owner, true);
+ bv()->updateInset(inset_owner);
}
if (selecting || lt->selection.mark()) {
lt->setSelection();
if (lt->isInInset())
- bv->updateInset(lt->inset_owner, false);
+ bv->updateInset(lt->inset_owner);
else
bv->toggleToggle();
}
if (!lt->isInInset()) {
- //if (fitcur)
- // bv->update(lt, BufferView::SELECT|BufferView::FITCUR);
- //else
- bv->update(lt, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(lt, BufferView::SELECT);
bv->showCursor();
} else if (bv->text->status() != LyXText::UNCHANGED) {
bv->theLockingInset()->hideInsetCursor(bv);
- bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
+ bv->update(BufferView::SELECT);
bv->showCursor();
}
{
bv()->hideCursor();
bv()->beforeChange(this);
- update(false);
+ update();
string contents;
if (same_content && cursor.par()->isInset(cursor.pos())) {
bv()->owner()->message(_("No more insets"));
}
}
- update(false);
+ update();
selection.cursor = cursor;
}
void LyXText::cursorPrevious()
{
+ int y = top_y();
+
if (!cursor.row()->previous()) {
- if (top_y() > 0) {
+ if (y > 0) {
int new_y = bv()->text->top_y() - bv()->workHeight();
bv()->screen().draw(bv()->text, bv(), new_y < 0 ? 0 : new_y);
bv()->updateScrollbar();
return;
}
- int y = top_y();
Row * cursorrow = cursor.row();
setCursorFromCoordinates(cursor.x_fix(), y);
void LyXText::cursorNext()
{
+ int top_y = top_y();
+
if (!cursor.row()->next()) {
int y = cursor.y() - cursor.row()->baseline() +
cursor.row()->height();
- if (y > top_y() + bv()->workHeight()) {
+ if (y > top_y + bv()->workHeight()) {
bv()->screen().draw(bv()->text, bv(), bv()->text->top_y() + bv()->workHeight());
bv()->updateScrollbar();
}
return;
}
- int y = top_y() + bv()->workHeight();
- if (inset_owner && !top_y()) {
+ int y = top_y + bv()->workHeight();
+ if (inset_owner && !top_y) {
y -= (bv()->text->cursor.iy()
- bv()->text->top_y()
+ bv()->theLockingInset()->insetInInsetY());
}
-void LyXText::update(bool changed)
+void LyXText::update()
{
- BufferView::UpdateCodes c = BufferView::SELECT | BufferView::FITCUR;
- if (changed)
- bv()->update(this, c | BufferView::CHANGE);
- else
- bv()->update(this, c);
+ bv()->update(this, BufferView::SELECT);
}
namespace {
void specialChar(LyXText * lt, BufferView * bv, InsetSpecialChar::Kind kind)
{
bv->hideCursor();
- lt->update(bv);
+ lt->update();
InsetSpecialChar * new_inset = new InsetSpecialChar(kind);
if (!bv->insertInset(new_inset))
delete new_inset;
else
- bv->updateInset(new_inset, true);
+ bv->updateInset(new_inset);
}
redoHeightOfParagraph();
postPaint(0);
setCursor(cursor.par(), cursor.pos());
- update(bv);
+ update();
break;
}
case LFUN_DELETE_WORD_FORWARD:
bv->beforeChange(this);
- update(false);
+ update();
deleteWordForward();
- update(bv);
+ update();
finishChange(bv);
break;
case LFUN_DELETE_WORD_BACKWARD:
bv->beforeChange(this);
- update(false);
+ update();
deleteWordBackward();
- update(true);
+ update();
finishChange(bv);
break;
case LFUN_DELETE_LINE_FORWARD:
bv->beforeChange(this);
- update(false);
+ update();
deleteLineForward();
update();
finishChange(bv);
case LFUN_TAB:
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
cursorTab();
finishChange(bv);
break;
case LFUN_WORDRIGHT:
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorLeftOneWord();
else
case LFUN_WORDLEFT:
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorRightOneWord();
else
case LFUN_BEGINNINGBUF:
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
cursorTop();
finishChange(bv);
break;
case LFUN_ENDBUF:
if (selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
cursorBottom();
finishChange(bv);
break;
case LFUN_RIGHTSEL:
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorLeft(bv);
else
break;
case LFUN_LEFTSEL:
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorRight(bv);
else
break;
case LFUN_UPSEL:
- update(false);
+ update();
cursorUp(true);
finishChange(bv, true);
break;
case LFUN_DOWNSEL:
- update(false);
+ update();
cursorDown(true);
finishChange(bv, true);
break;
case LFUN_UP_PARAGRAPHSEL:
- update(false);
+ update();
cursorUpParagraph();
finishChange(bv, true);
break;
case LFUN_DOWN_PARAGRAPHSEL:
- update(false);
+ update();
cursorDownParagraph();
finishChange(bv, true);
break;
case LFUN_PRIORSEL:
- update(false);
+ update();
cursorPrevious();
finishChange(bv, true);
break;
case LFUN_NEXTSEL:
- update(false);
+ update();
cursorNext();
finishChange(bv, true);
break;
case LFUN_HOMESEL:
- update(false);
+ update();
cursorHome();
finishChange(bv, true);
break;
case LFUN_ENDSEL:
- update(false);
+ update();
cursorEnd();
finishChange(bv, true);
break;
case LFUN_WORDRIGHTSEL:
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorLeftOneWord();
else
break;
case LFUN_WORDLEFTSEL:
- update(false);
+ update();
if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
cursorRightOneWord();
else
break;
case LFUN_WORDSEL: {
- update(false);
+ update();
LyXCursor cur1;
LyXCursor cur2;
getWord(cur1, cur2, WHOLE_WORD);
bool is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params);
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
if (is_rtl)
cursorLeft(false);
if (cursor.pos() < cursor.par()->size()
bool const is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params);
if (!selection.mark())
bv->beforeChange(this);
- update(false);
+ update();
LyXCursor const cur = cursor;
if (!is_rtl)
cursorLeft(false);
case LFUN_HOME:
if (!selection.mark())
bv->beforeChange(this);
- update(bv);
+ update();
cursorHome();
finishChange(bv, false);
break;
case LFUN_END:
if (!selection.mark())
bv->beforeChange(this);
- update(bv);
+ update();
cursorEnd();
finishChange(bv, false);
break;
bv->beforeChange(this);
insertInset(new InsetNewline);
- update(true);
+ update();
setCursor(cursor.par(), cursor.pos());
moveCursorUpdate(bv, false);
break;
if (!selection.set()) {
Delete();
selection.cursor = cursor;
- update(bv);
+ update();
// It is possible to make it a lot faster still
// just comment out the line below...
bv->showCursor();
} else {
- update(false);
+ update();
cutSelection(bv, true);
- update(bv);
+ update();
}
moveCursorUpdate(bv, false);
bv->owner()->view_state_changed();
cur.par()->params().align(),
cur.par()->params().labelWidthString(), 0);
cursorLeft(bv);
- update(bv);
+ update();
} else {
cursorLeft(bv);
Delete();
selection.cursor = cursor;
}
} else {
- update(false);
+ update();
cutSelection(bv, true);
}
- update(bv);
+ update();
break;
if (bv->owner()->getIntl().getTransManager().backspace()) {
backspace();
selection.cursor = cursor;
- update(bv);
+ update();
// It is possible to make it a lot faster still
// just comment out the line below...
bv->showCursor();
}
} else {
- update(false);
+ update();
cutSelection(bv, true);
- update(bv);
+ update();
}
bv->owner()->view_state_changed();
bv->switchKeyMap();
selection.cursor = cur;
}
} else {
- update(false);
+ update();
cutSelection(bv, true);
}
- update(bv);
+ update();
break;
case LFUN_BREAKPARAGRAPH:
bv->beforeChange(this);
breakParagraph(bv->buffer()->paragraphs, 0);
- update(bv);
+ update();
selection.cursor = cursor;
bv->switchKeyMap();
bv->owner()->view_state_changed();
case LFUN_BREAKPARAGRAPHKEEPLAYOUT:
bv->beforeChange(this);
breakParagraph(bv->buffer()->paragraphs, 1);
- update(bv);
+ update();
selection.cursor = cursor;
bv->switchKeyMap();
bv->owner()->view_state_changed();
cur.par()->params().spacing(),
cur.par()->params().align(),
cur.par()->params().labelWidthString(), 1);
- //update(bv);
}
}
else {
breakParagraph(bv->buffer()->paragraphs, 0);
- //update(bv);
}
- update(bv);
+ update();
selection.cursor = cur;
bv->switchKeyMap();
bv->owner()->view_state_changed();
if (cur_spacing != new_spacing || cur_value != new_value) {
par->params().spacing(Spacing(new_spacing, new_value));
redoParagraph();
- update(bv);
+ update();
}
break;
}
case LFUN_INSET_TOGGLE:
bv->hideCursor();
bv->beforeChange(this);
- update(false);
+ update();
toggleInset();
- update(false);
+ update();
bv->switchKeyMap();
break;
case LFUN_PROTECTEDSPACE:
if (cursor.par()->layout()->free_spacing) {
insertChar(' ');
- update(bv);
+ update();
} else {
specialChar(this, bv, InsetSpecialChar::PROTECTED_SEPARATOR);
}
case LFUN_MARK_OFF:
bv->beforeChange(this);
- update(false);
+ update();
selection.cursor = cursor;
cmd.message(N_("Mark off"));
break;
case LFUN_MARK_ON:
bv->beforeChange(this);
selection.mark(true);
- update(false);
+ update();
selection.cursor = cursor;
cmd.message(N_("Mark on"));
break;
case LFUN_SETMARK:
bv->beforeChange(this);
if (selection.mark()) {
- update(bv);
+ update();
cmd.message(N_("Mark removed"));
} else {
selection.mark(true);
- update(bv);
+ update();
cmd.message(N_("Mark set"));
}
selection.cursor = cursor;
break;
case LFUN_UPCASE_WORD:
- update(false);
+ update();
changeCase(LyXText::text_uppercase);
if (inset_owner)
- bv->updateInset(inset_owner, true);
- update(bv);
+ bv->updateInset(inset_owner);
+ update();
break;
case LFUN_LOWCASE_WORD:
- update(false);
+ update();
changeCase(LyXText::text_lowercase);
if (inset_owner)
- bv->updateInset(inset_owner, true);
+ bv->updateInset(inset_owner);
update();
break;
case LFUN_CAPITALIZE_WORD:
- update(false);
+ update();
changeCase(LyXText::text_capitalization);
if (inset_owner)
- bv->updateInset(inset_owner, true);
- update(bv);
+ bv->updateInset(inset_owner);
+ update();
break;
case LFUN_TRANSPOSE_CHARS:
- update(false);
+ update();
transposeChars();
if (inset_owner)
- bv->updateInset(inset_owner, true);
- update(bv);
+ bv->updateInset(inset_owner);
+ update();
break;
case LFUN_PASTE:
// clear the selection
bv->toggleSelection();
clearSelection();
- update(false);
+ update();
pasteSelection();
clearSelection(); // bug 393
- update(false);
- update(bv);
+ update();
bv->switchKeyMap();
break;
case LFUN_CUT:
bv->hideCursor();
- update(false);
+ update();
cutSelection(bv, true);
- update(bv);
+ update();
cmd.message(_("Cut"));
break;
case LFUN_BEGINNINGBUFSEL:
if (inset_owner)
return UNDISPATCHED;
- update(false);
+ update();
cursorTop();
finishChange(bv, true);
break;
case LFUN_ENDBUFSEL:
if (inset_owner)
return UNDISPATCHED;
- update(false);
+ update();
cursorBottom();
finishChange(bv, true);
break;
if (change_layout) {
bv->hideCursor();
current_layout = layout;
- update(false);
+ update();
setLayout(layout);
bv->owner()->setLayout(layout);
- update(bv);
+ update();
bv->switchKeyMap();
}
break;
else
insertStringAsLines(clip);
clearSelection();
- update(bv);
+ update();
}
break;
}
for (int i = 0; i < datetmp_len; i++) {
insertChar(datetmp[i]);
- update(true);
+ update();
}
selection.cursor = cursor;
moveCursorUpdate(bv, false);
setSelection();
if (!isInInset())
bv->screen().toggleSelection(this, bv, false);
- update(false);
+ update();
bv->haveSelection(selection.set());
}
break;
} else {
selectWord(LyXText::WHOLE_WORD_STRICT);
}
- update(false);
+ update();
bv->haveSelection(selection.set());
}
break;
// Maybe an empty line was deleted
if (!bv->text->selection.set())
- bv->update(bv->text, BufferView::UPDATE);
+ bv->update(BufferView::UPDATE);
bv->text->setSelection();
bv->screen().toggleToggle(bv->text, bv);
bv->fitCursor();
if (lyxrc.auto_region_delete) {
if (selection.set()) {
cutSelection(false, false);
- update(bv);
+ update();
}
bv->haveSelection(false);
}
bv->owner()->getIntl().getTransManager().
TranslateAndInsert(*cit, this);
- update(bv);
+ update();
selection.cursor = cursor;
moveCursorUpdate(bv, false);
t->updateCounters();
bv->fitCursor();
}
- bv->updateInset(it, false);
+ bv->updateInset(it);
bv->text->setCursorIntern(bv->text->cursor.par(),
bv->text->cursor.pos());
} else {