mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
fix undo in grids
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10149 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
219f6bdb6e
commit
e87254ab12
@ -1,3 +1,8 @@
|
||||
2005-07-07 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* math_gridinset.C (doDispatch): use recordUndoInset when more than
|
||||
one cell is changed
|
||||
|
||||
2005-07-06 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* math_gridinset.C (doDispatch): better fix for the assertion
|
||||
|
@ -1040,7 +1040,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
|
||||
// insert file functions
|
||||
case LFUN_DELETE_LINE_FORWARD:
|
||||
recordUndo(cur);
|
||||
recordUndoInset(cur);
|
||||
//autocorrect_ = false;
|
||||
//macroModeClose();
|
||||
//if (selection_) {
|
||||
@ -1061,7 +1061,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_BREAKLINE: {
|
||||
recordUndo(cur);
|
||||
recordUndoInset(cur);
|
||||
row_type const r = cur.row();
|
||||
addRow(r);
|
||||
|
||||
@ -1082,7 +1082,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_TABULAR_FEATURE: {
|
||||
recordUndo(cur);
|
||||
recordUndoInset(cur);
|
||||
//lyxerr << "handling tabular-feature " << cmd.argument << endl;
|
||||
istringstream is(cmd.argument);
|
||||
string s;
|
||||
@ -1172,7 +1172,6 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_PASTE: {
|
||||
recordUndo(cur);
|
||||
lyxerr << "MathGridInset: PASTE: " << cmd << std::endl;
|
||||
istringstream is(cmd.argument);
|
||||
int n = 0;
|
||||
@ -1181,10 +1180,12 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
mathed_parse_normal(grid, lyx::cap::getSelection(cur.buffer(), n));
|
||||
if (grid.nargs() == 1) {
|
||||
// single cell/part of cell
|
||||
recordUndo(cur);
|
||||
cur.cell().insert(cur.pos(), grid.cell(0));
|
||||
cur.pos() += grid.cell(0).size();
|
||||
} else {
|
||||
// multiple cells
|
||||
recordUndoInset(cur);
|
||||
col_type const numcols =
|
||||
min(grid.ncols(), ncols() - col(cur.idx()));
|
||||
row_type const numrows =
|
||||
@ -1316,7 +1317,7 @@ bool MathGridInset::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
|
||||
#if 0
|
||||
// FIXME: What did this code do?
|
||||
// Please check wether it is still needed!
|
||||
// Please check whether it is still needed!
|
||||
// should be more precise
|
||||
if (v_align_ == '\0') {
|
||||
flag.enable(true);
|
||||
|
Loading…
Reference in New Issue
Block a user