]> git.lyx.org Git - features.git/commitdiff
extend John's getLyXText() patch
authorAllan Rae <rae@lyx.org>
Wed, 5 Dec 2001 05:53:01 +0000 (05:53 +0000)
committerAllan Rae <rae@lyx.org>
Wed, 5 Dec 2001 05:53:01 +0000 (05:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3148 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QParagraph.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormParagraph.C

index 161b40e94beb13fb0c82e0b01e88427e48d7b6dc..882d92a465d03819df9a3483e1a98620bd08a84d 100644 (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:
index 602db737c546f2250cdf31efef9a539ddff2c707..025c63a503b35aa201071876540e6f43c3745f06 100644 (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,11 +135,12 @@ 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(),
-               dialog_->getLineAbove(), dialog_->getLineBelow(),
-               dialog_->getPagebreakAbove(), dialog_->getPagebreakBelow(),
-               spaceabove, spacebelow, Spacing(), dialog_->getAlign(),
-               dialog_->getLabelWidth(), dialog_->getNoIndent());
+       LyXText * text(lv_->view()->getLyXText());
+       text->setParagraph(lv_->view(),
+                          dialog_->getLineAbove(), dialog_->getLineBelow(),
+                          dialog_->getPagebreakAbove(), dialog_->getPagebreakBelow(),
+                          spaceabove, spacebelow, Spacing(), dialog_->getAlign(),
+                          dialog_->getLabelWidth(), dialog_->getNoIndent());
 
        // extra stuff
 
@@ -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);
index 0fcfe18da40353c9020c4ead664b5d564cc7ab41..3d66ddf16c413614262d0f0fc7c544151029a124 100644 (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): 
index 791af6a5a237e6226b4cea543203bb5efef857a3..27ac50bf9f4514d1de2451de5b95a79a05c08f27 100644 (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"));