}
if (!lt->isInInset()) {
bv->update(lt, BufferView::SELECT);
- bv->showCursor();
} else if (bv->text->refreshStatus() != LyXText::REFRESH_NONE) {
- bv->theLockingInset()->hideInsetCursor(bv);
bv->update(BufferView::SELECT);
- bv->showCursor();
}
if (!lt->selection.set())
void LyXText::gotoInset(vector<Inset::Code> const & codes,
- bool same_content)
+ bool same_content)
{
- bv()->hideCursor();
bv()->beforeChange(this);
update();
string contents;
- if (same_content && cursor.par()->isInset(cursor.pos())) {
+ if (same_content && cursor.pos() < cursor.par()->size()
+ && cursor.par()->isInset(cursor.pos())) {
Inset const * inset = cursor.par()->getInset(cursor.pos());
if (find(codes.begin(), codes.end(), inset->lyxCode())
!= codes.end())
void specialChar(LyXText * lt, BufferView * bv, InsetSpecialChar::Kind kind)
{
- bv->hideCursor();
lt->update();
InsetSpecialChar * new_inset = new InsetSpecialChar(kind);
if (!bv->insertInset(new_inset))
for (; tmp != end; ++tmp) {
if (tmp->params().startOfAppendix()) {
- setUndo(bv, Undo::EDIT, &*tmp, &*boost::next(tmp));
+ setUndo(bv, Undo::EDIT, tmp, boost::next(tmp));
tmp->params().startOfAppendix(false);
int tmpy;
setHeightOfRow(getRow(tmp, 0, tmpy));
}
}
- setUndo(bv, Undo::EDIT, &*pit, &*boost::next(pit));
+ setUndo(bv, Undo::EDIT, pit, boost::next(pit));
pit->params().startOfAppendix(start);
// we can set the refreshing parameters now
update();
// It is possible to make it a lot faster still
// just comment out the line below...
- bv->showCursor();
} else {
update();
cutSelection(bv, true);
update();
// It is possible to make it a lot faster still
// just comment out the line below...
- bv->showCursor();
}
} else {
update();
break;
}
+ case LFUN_INSET_SETTINGS:
+ lyx::Assert(bv->theLockingInset());
+ bv->theLockingInset()->getLockingInset()->showInsetDialog(bv);
+ break;
+
case LFUN_INSET_TOGGLE:
- bv->hideCursor();
bv->beforeChange(this);
update();
toggleInset();
case LFUN_PASTE:
cmd.message(_("Paste"));
- bv->hideCursor();
// clear the selection
bv->toggleSelection();
clearSelection();
break;
case LFUN_CUT:
- bv->hideCursor();
update();
cutSelection(bv, true);
update();
}
}
if (change_layout) {
- bv->hideCursor();
current_layout = layout;
update();
setLayout(layout);
case LFUN_PASTESELECTION: {
if (!bv->buffer())
break;
- bv->hideCursor();
// this was originally a beforeChange(bv->text), i.e
// the outermost LyXText!
bv->beforeChange(this);
else
c = pit->getChar(pos - 1);
- bv->hideCursor();
LyXLayout_ptr const & style = pit->layout();
if (style->pass_thru ||
break;
if (cmd.button() == mouse_button::button1) {
if (!isInInset()) {
- bv->screen().hideCursor();
bv->screen().toggleSelection(this, bv);
}
cursorHome();
break;
if (cmd.button() == mouse_button::button1) {
if (!isInInset()) {
- bv->screen().hideCursor();
bv->screen().toggleSelection(this, bv);
selectWord(LyXText::WHOLE_WORD_STRICT);
bv->screen().toggleSelection(this, bv, false);
break;
}
- bv->screen().hideCursor();
-
RowList::iterator cursorrow = bv->text->cursor.row();
bv->text->setCursorFromCoordinates(cmd.x, cmd.y + bv->text->top_y());
#if 0
bv->text->setSelection();
bv->screen().toggleToggle(bv->text, bv);
bv->fitCursor();
- bv->showCursor();
break;
}
if (!inset_hit)
selection_possible = true;
- bv->screen().hideCursor();
// Clear the selection
bv->screen().toggleSelection(bv->text, bv);
UpdatableInset * inset = static_cast<UpdatableInset *>(inset_hit);
selection_possible = false;
bv->owner()->message(inset->editMessage());
- //inset->edit(bv, x, y, cmd.button());
// We just have to lock the inset before calling a PressEvent on it!
- // we don't need the edit() call here! (Jug20020329)
if (!bv->lockInset(inset))
lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
FuncRequest cmd1(bv, LFUN_MOUSE_PRESS, x, y, cmd.button());