mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Small fix and optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2475 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31028168b2
commit
ed04b53081
@ -1,3 +1,8 @@
|
|||||||
|
2001-08-10 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* insettext.C (update): comment this out as it seems first wrong
|
||||||
|
and second not needed anymore!
|
||||||
|
|
||||||
2001-08-08 Juergen Vigna <jug@sad.it>
|
2001-08-08 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* insettabular.C (setPos): fixed wrong actrow < rows() check.
|
* insettabular.C (setPos): fixed wrong actrow < rows() check.
|
||||||
|
@ -167,7 +167,7 @@ void InsetText::init(InsetText const * ins, bool same_id)
|
|||||||
insetWidth = 0;
|
insetWidth = 0;
|
||||||
old_max_width = 0;
|
old_max_width = 0;
|
||||||
no_selection = false;
|
no_selection = false;
|
||||||
need_update = INIT;
|
need_update = FULL;
|
||||||
drawTextXOffset = 0;
|
drawTextXOffset = 0;
|
||||||
drawTextYOffset = 0;
|
drawTextYOffset = 0;
|
||||||
xpos = 0.0;
|
xpos = 0.0;
|
||||||
@ -267,7 +267,7 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
|
|||||||
lex.printError("Missing \\end_inset at this point. "
|
lex.printError("Missing \\end_inset at this point. "
|
||||||
"Read: `$$Token'");
|
"Read: `$$Token'");
|
||||||
}
|
}
|
||||||
need_update = INIT;
|
need_update = FULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -476,7 +476,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
clearFrame(pain, cleared);
|
clearFrame(pain, cleared);
|
||||||
x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
|
x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
|
||||||
if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
|
if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
|
||||||
need_update |= INIT;
|
need_update |= FULL;
|
||||||
} else if (need_update != INIT)
|
} else if (need_update != INIT)
|
||||||
need_update = NONE;
|
need_update = NONE;
|
||||||
if (clear)
|
if (clear)
|
||||||
@ -540,6 +540,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
|
|||||||
lt = getLyXText(bv);
|
lt = getLyXText(bv);
|
||||||
clear = true;
|
clear = true;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
int oldw = insetWidth;
|
int oldw = insetWidth;
|
||||||
insetWidth = lt->width + (2 * TEXT_TO_INSET_OFFSET);
|
insetWidth = lt->width + (2 * TEXT_TO_INSET_OFFSET);
|
||||||
if (oldw != insetWidth) {
|
if (oldw != insetWidth) {
|
||||||
@ -550,6 +551,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
|
|||||||
in_update = false;
|
in_update = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((need_update & CURSOR_PAR) && (lt->status() == LyXText::UNCHANGED) &&
|
if ((need_update & CURSOR_PAR) && (lt->status() == LyXText::UNCHANGED) &&
|
||||||
the_locking_inset)
|
the_locking_inset)
|
||||||
{
|
{
|
||||||
@ -1903,6 +1905,7 @@ void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
|
|||||||
|
|
||||||
void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
||||||
{
|
{
|
||||||
|
// lyxerr << "InsetText::resizeLyXText\n";
|
||||||
if (!par->next() && !par->size()) // no data, resize not neccessary!
|
if (!par->next() && !par->size()) // no data, resize not neccessary!
|
||||||
return;
|
return;
|
||||||
// one endless line, resize normally not necessary
|
// one endless line, resize normally not necessary
|
||||||
@ -1942,6 +1945,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
|||||||
|
|
||||||
void InsetText::reinitLyXText(bool wrong_cursor) const
|
void InsetText::reinitLyXText(bool wrong_cursor) const
|
||||||
{
|
{
|
||||||
|
// lyxerr << "InsetText::reinitLyXText\n";
|
||||||
for(Cache::iterator it = cache.begin(); it != cache.end(); ++it) {
|
for(Cache::iterator it = cache.begin(); it != cache.end(); ++it) {
|
||||||
lyx::Assert(it->second.text.get());
|
lyx::Assert(it->second.text.get());
|
||||||
|
|
||||||
@ -2115,7 +2119,7 @@ void InsetText::paragraph(Paragraph * p)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// redraw myself when asked for
|
// redraw myself when asked for
|
||||||
need_update |= INIT;
|
need_update = INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user