remove reinit argument from LyXText::init (act as if always true)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7274 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2003-07-15 08:26:17 +00:00
parent 68e8fb6694
commit 4cd3bf1c07
5 changed files with 20 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2003-07-15 Alfredo Braunstein <abraunst@libero.it>
* lyxtext.h (init): remove reinit argument (act as if always true)
* text2.C: adjust to that
2003-07-14 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* bufferview_funcs.[Ch]: introduce function replaceSelection()

View File

@ -1,4 +1,7 @@
2003-07-15 Alfredo Braunstein <abraunst@libero.it>
* insettext.C: adjust call to LyXText::init
2003-07-14 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* insettext.C: use bufferview_funcs->replaceSelection()

View File

@ -2005,7 +2005,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
// no data, resize not neccessary!
// we have to do this as a fixed width may have changed!
saveLyXTextState();
text_.init(bv, true);
text_.init(bv);
restoreLyXTextState();
return;
}
@ -2026,7 +2026,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
const_cast<ParagraphList&>(paragraphs).end(),
boost::bind(&Paragraph::resizeInsetsLyXText, _1, bv));
text_.init(bv, true);
text_.init(bv);
restoreLyXTextState();
if (the_locking_inset) {
@ -2058,7 +2058,7 @@ void InsetText::reinitLyXText() const
const_cast<ParagraphList&>(paragraphs).end(),
boost::bind(&Paragraph::resizeInsetsLyXText, _1, bv));
text_.init(bv, true);
text_.init(bv);
restoreLyXTextState();
if (the_locking_inset) {
inset_x = cix(bv) - top_x + drawTextXOffset;

View File

@ -59,7 +59,7 @@ public:
/// sets inset as owner
LyXText(BufferView *, InsetText *);
void init(BufferView *, bool reinit = false);
void init(BufferView *);
///
int height;
///

View File

@ -81,16 +81,14 @@ LyXText::LyXText(BufferView * bv, InsetText * inset)
}
void LyXText::init(BufferView * bview, bool reinit)
void LyXText::init(BufferView * bview)
{
bv_owner = bview;
if (reinit) {
rowlist_.clear();
need_break_row = rows().end();
width = height = 0;
clearPaint();
} else if (!rowlist_.empty())
return;
rowlist_.clear();
need_break_row = rows().end();
width = height = 0;
clearPaint();
anchor_row_ = rows().end();
anchor_row_offset_ = 0;
@ -100,9 +98,9 @@ void LyXText::init(BufferView * bview, bool reinit)
current_font = getFont(bview->buffer(), pit, 0);
for (; pit != end; ++pit) {
for (; pit != end; ++pit)
insertParagraph(pit, rowlist_.end());
}
setCursorIntern(rowlist_.begin()->par(), 0);
selection.cursor = cursor;
@ -728,7 +726,6 @@ void LyXText::redoParagraphs(LyXCursor const & cur,
void LyXText::fullRebreak()
{
rows().clear();
init(bv());
setCursorIntern(cursor.par(), cursor.pos());
}