mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
add an additional full rebreak for 'resizeCurrentBuffer'.
remove some #if 0 code from singleWidth rebreaking git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7558 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
040a03e4a4
commit
d28b89ba80
@ -427,6 +427,10 @@ void BufferView::Pimpl::resizeCurrentBuffer()
|
||||
selendpar = bv_->text->ownerParagraphs().end();
|
||||
}
|
||||
|
||||
#warning doesn't help much
|
||||
bv_->text->redoParagraphs(bv_->text->ownerParagraphs().begin(),
|
||||
bv_->text->ownerParagraphs().end());
|
||||
|
||||
if (par != bv_->text->ownerParagraphs().end()) {
|
||||
bv_->text->selection.set(true);
|
||||
// At this point just to avoid the Delete-Empty-Paragraph-
|
||||
|
24
src/text.C
24
src/text.C
@ -223,26 +223,12 @@ int LyXText::singleWidth(ParagraphList::iterator pit,
|
||||
|
||||
if (c == Paragraph::META_INSET) {
|
||||
InsetOld * tmpinset = pit->getInset(pos);
|
||||
if (tmpinset) {
|
||||
if (tmpinset->lyxCode() == InsetOld::HFILL_CODE) {
|
||||
// Because of the representation as vertical lines
|
||||
return 3;
|
||||
}
|
||||
#if 0
|
||||
#warning enabling this fixes the 'insets of width 0 on load' problem
|
||||
// this IS needed otherwise on initialitation we don't get the fill
|
||||
// of the row right (ONLY on initialization if we read a file!)
|
||||
// should be changed! (Jug 20011204)
|
||||
//tmpinset->update(bv());
|
||||
Dimension dim;
|
||||
MetricsInfo mi(bv(), font, workWidth());
|
||||
tmpinset->metrics(mi, dim);
|
||||
return dim.wid;
|
||||
#else
|
||||
return tmpinset->width();
|
||||
#endif
|
||||
Assert(tmpinset);
|
||||
if (tmpinset->lyxCode() == InsetOld::HFILL_CODE) {
|
||||
// Because of the representation as vertical lines
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
return tmpinset->width();
|
||||
}
|
||||
|
||||
if (IsSeparatorChar(c))
|
||||
|
Loading…
Reference in New Issue
Block a user