extend John's getLyXText() patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3148 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Allan Rae 2001-12-05 05:53:01 +00:00
parent 5f3773f2b8
commit e1eb45f5d3
4 changed files with 18 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2001-12-05 Allan Rae <rae@lyx.org>
* QParagraph.C (apply):
(update): Use the right LyXText -- extending John's fix
2001-12-01 Maks Orlovich <mo002j@mail.rochester.edu>
* moc/Makefile.am:

View File

@ -56,14 +56,7 @@ void QParagraph::update(bool switched)
dialog_->setReadOnly(readonly);
}
LyXText * text = 0;
if (lv_->view()->theLockingInset())
text = lv_->view()->theLockingInset()->getLyXText(lv_->view());
if (!text)
text = lv_->view()->text;
LyXText * text(lv_->view()->getLyXText());
Paragraph * par = text->cursor.par();
int align = par->getAlign();
@ -142,7 +135,8 @@ void QParagraph::apply()
lyxerr[Debug::GUI] << "Setting above space \"" << LyXGlueLength(spaceabove.length().asString()).asString() << "\"" << endl;
lyxerr[Debug::GUI] << "Setting below space \"" << LyXGlueLength(spacebelow.length().asString()).asString() << "\"" << endl;
lv_->view()->text->setParagraph(lv_->view(),
LyXText * text(lv_->view()->getLyXText());
text->setParagraph(lv_->view(),
dialog_->getLineAbove(), dialog_->getLineBelow(),
dialog_->getPagebreakAbove(), dialog_->getPagebreakBelow(),
spaceabove, spacebelow, Spacing(), dialog_->getAlign(),
@ -162,7 +156,7 @@ void QParagraph::apply()
lyxerr[Debug::GUI] << "Setting extrawidth \"" << width << "\"" << endl;
lyxerr[Debug::GUI] << "Setting percent extrawidth \"" << widthp << "\"" << endl;
lv_->view()->update(lv_->view()->text,
lv_->view()->update(text,
BufferView::SELECT |
BufferView::FITCUR |
BufferView::CHANGE);

View File

@ -1,3 +1,7 @@
2001-12-05 Allan Rae <rae@lyx.org>
* FormParagraph.C (apply): One other LyXText fix.
2001-12-05 John Levon <moz@compsoc.man.ac.uk>
* FormParagraph.C (getCurrentParagraph):

View File

@ -279,7 +279,7 @@ void FormParagraph::apply()
// Actually apply these settings
lv_->view()->update(lv_->view()->text,
lv_->view()->update(text,
BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
lv_->buffer()->markDirty();
setMinibuffer(lv_, _("Paragraph layout set"));