}
- if (text_.selection.set()) {
+ if (text_.selection.set())
setUndo(bv, Undo::EDIT, text_.cursor.par());
- }
- if (selectall)
- selectAll(bv);
+ if (selectall) {
+ text_.cursorTop();
+ text_.selection.cursor = text_.cursor;
+ text_.cursorBottom();
+ text_.setSelection();
+ }
text_.toggleFree(font, toggleall);
}
-void InsetText::selectAll(BufferView * bv)
-{
- getLyXText(bv)->cursorTop();
- getLyXText(bv)->selection.cursor = getLyXText(bv)->cursor;
- getLyXText(bv)->cursorBottom();
- getLyXText(bv)->setSelection();
-}
-
-
void InsetText::clearSelection(BufferView * bv)
{
getLyXText(bv)->clearSelection();
UpdatableInset::scroll(bv, offset);
}
///
- void selectAll(BufferView * bv);
- ///
void clearSelection(BufferView * bv);
///
Inset * getInsetFromID(int id) const;