mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
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:
parent
338fb721b8
commit
8466aa353b
@ -1,7 +1,11 @@
|
|||||||
2001-08-10 Juergen Vigna <jug@sad.it>
|
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
|
* insettabular.C (calculate_dimensions_of_cells): let's try to call
|
||||||
update only for fixed with cells.
|
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
|
* insettext.C (update): comment this out as it seems first wrong
|
||||||
and second not needed anymore!
|
and second not needed anymore!
|
||||||
|
@ -1323,7 +1323,7 @@ int InsetTabular::getCellXPos(int cell) const
|
|||||||
|
|
||||||
void InsetTabular::resetPos(BufferView * bv) const
|
void InsetTabular::resetPos(BufferView * bv) const
|
||||||
{
|
{
|
||||||
if (!locked)
|
if (!locked || nodraw())
|
||||||
return;
|
return;
|
||||||
actcol = tabular->column_of_cell(actcell);
|
actcol = tabular->column_of_cell(actcell);
|
||||||
|
|
||||||
|
@ -69,6 +69,15 @@ extern int greek_kb_flag;
|
|||||||
|
|
||||||
void InsetText::saveLyXTextState(LyXText * t) const
|
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.lpar = t->cursor.par();
|
||||||
sstate.pos = t->cursor.pos();
|
sstate.pos = t->cursor.pos();
|
||||||
sstate.boundary = t->cursor.boundary();
|
sstate.boundary = t->cursor.boundary();
|
||||||
@ -81,6 +90,9 @@ void InsetText::saveLyXTextState(LyXText * t) const
|
|||||||
sstate.selection = t->selection.set();
|
sstate.selection = t->selection.set();
|
||||||
sstate.mark_set = t->selection.mark();
|
sstate.mark_set = t->selection.mark();
|
||||||
sstate.refresh = t->refresh_row != 0;
|
sstate.refresh = t->refresh_row != 0;
|
||||||
|
} else {
|
||||||
|
sstate.lpar = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InsetText::restoreLyXTextState(BufferView * bv, LyXText * t) const
|
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";
|
// lyxerr << "InsetText::reinitLyXText\n";
|
||||||
for(Cache::iterator it = cache.begin(); it != cache.end(); ++it) {
|
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();
|
LyXText * t = it->second.text.get();
|
||||||
BufferView * bv = it->first;
|
BufferView * bv = it->first;
|
||||||
|
|
||||||
if (wrong_cursor) {
|
|
||||||
t->cursor.par(par);
|
|
||||||
t->cursor.pos(0);
|
|
||||||
t->clearSelection();
|
|
||||||
}
|
|
||||||
saveLyXTextState(t);
|
saveLyXTextState(t);
|
||||||
for (Paragraph * p = par; p; p = p->next()) {
|
for (Paragraph * p = par; p; p = p->next()) {
|
||||||
p->resizeInsetsLyXText(bv);
|
p->resizeInsetsLyXText(bv);
|
||||||
|
@ -320,7 +320,7 @@ private:
|
|||||||
void saveLyXTextState(LyXText *) const;
|
void saveLyXTextState(LyXText *) const;
|
||||||
void restoreLyXTextState(BufferView *, LyXText *) const;
|
void restoreLyXTextState(BufferView *, LyXText *) const;
|
||||||
///
|
///
|
||||||
void reinitLyXText(bool wrong_cursor = false) const;
|
void reinitLyXText() const;
|
||||||
|
|
||||||
/* Private structures and variables */
|
/* Private structures and variables */
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user