Some more fixes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2482 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-08-10 12:21:42 +00:00
parent 338fb721b8
commit 8466aa353b
4 changed files with 31 additions and 20 deletions

View File

@ -1,7 +1,11 @@
2001-08-10 Juergen Vigna <jug@sad.it>
* insettext.C (saveLyXTextState): check for invalid cursor-par.
(reinitLyXText): remove wrong_cursor bool as not needed anymore!
* insettabular.C (calculate_dimensions_of_cells): let's try to call
update only for fixed with cells.
(resetPos): try to fix the lockup on spellchecking or s&r.
* insettext.C (update): comment this out as it seems first wrong
and second not needed anymore!

View File

@ -1323,7 +1323,7 @@ int InsetTabular::getCellXPos(int cell) const
void InsetTabular::resetPos(BufferView * bv) const
{
if (!locked)
if (!locked || nodraw())
return;
actcol = tabular->column_of_cell(actcell);

View File

@ -69,6 +69,15 @@ extern int greek_kb_flag;
void InsetText::saveLyXTextState(LyXText * t) const
{
// check if my paragraphs are still valid
Paragraph * p = par;
while(p) {
if (p == t->cursor.par())
break;
p = p->next();
}
if (p && t->cursor.pos() <= p->size()) {
sstate.lpar = t->cursor.par();
sstate.pos = t->cursor.pos();
sstate.boundary = t->cursor.boundary();
@ -81,6 +90,9 @@ void InsetText::saveLyXTextState(LyXText * t) const
sstate.selection = t->selection.set();
sstate.mark_set = t->selection.mark();
sstate.refresh = t->refresh_row != 0;
} else {
sstate.lpar = 0;
}
}
void InsetText::restoreLyXTextState(BufferView * bv, LyXText * t) const
@ -1942,7 +1954,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
}
void InsetText::reinitLyXText(bool wrong_cursor) const
void InsetText::reinitLyXText() const
{
// lyxerr << "InsetText::reinitLyXText\n";
for(Cache::iterator it = cache.begin(); it != cache.end(); ++it) {
@ -1951,11 +1963,6 @@ void InsetText::reinitLyXText(bool wrong_cursor) const
LyXText * t = it->second.text.get();
BufferView * bv = it->first;
if (wrong_cursor) {
t->cursor.par(par);
t->cursor.pos(0);
t->clearSelection();
}
saveLyXTextState(t);
for (Paragraph * p = par; p; p = p->next()) {
p->resizeInsetsLyXText(bv);

View File

@ -320,7 +320,7 @@ private:
void saveLyXTextState(LyXText *) const;
void restoreLyXTextState(BufferView *, LyXText *) const;
///
void reinitLyXText(bool wrong_cursor = false) const;
void reinitLyXText() const;
/* Private structures and variables */
///