mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
add comments and remove dead code from revision 19721.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19726 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e6d5cb553
commit
65e16cdb27
@ -489,27 +489,21 @@ int BufferView::workWidth() const
|
|||||||
|
|
||||||
void BufferView::updateOffsetRef()
|
void BufferView::updateOffsetRef()
|
||||||
{
|
{
|
||||||
|
// No need to update offset_ref_ in this case.
|
||||||
if (!need_centering_)
|
if (!need_centering_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// We are not properly started yet, delay until resizing is
|
||||||
|
// done.
|
||||||
if (height_ == 0)
|
if (height_ == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CursorSlice & bot = cursor_.bottom();
|
CursorSlice & bot = cursor_.bottom();
|
||||||
TextMetrics & tm = text_metrics_[bot.text()];
|
TextMetrics & tm = text_metrics_[bot.text()];
|
||||||
pit_type const pit = bot.pit();
|
ParagraphMetrics const & pm = tm.parMetrics(bot.pit());
|
||||||
ParagraphMetrics const & pm = tm.parMetrics(pit);
|
|
||||||
anchor_ref_ = pit;
|
|
||||||
//DocIterator dit;
|
|
||||||
//dit.push_back(bot);
|
|
||||||
//dit.pos() = 0;
|
|
||||||
|
|
||||||
Point p = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary());
|
Point p = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary());
|
||||||
offset_ref_ = p.y_ + pm.ascent() - height_ / 2;
|
offset_ref_ = p.y_ + pm.ascent() - height_ / 2;
|
||||||
|
|
||||||
lyxerr << "p.y_ " << p.y_ << " pm.ascent() " << pm.ascent() << " h/2 " << height_/2
|
|
||||||
<< " offset_ref_ " << offset_ref_ << endl;
|
|
||||||
|
|
||||||
need_centering_ = false;
|
need_centering_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user