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

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

index f526a515360e34dc6a6b4ae9fc508768cebceff0..0fcfe18da40353c9020c4ead664b5d564cc7ab41 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-05  John Levon  <moz@compsoc.man.ac.uk>
+
+       * FormParagraph.C (getCurrentParagraph): 
+       (apply):  get the right LyXText !
 2001-11-29  John Levon  <moz@compsoc.man.ac.uk>
 
        * FormParagraph.C: disallow page breaks in insets
index e8e87c61352d86b6e8c838eb26bb8f3895faa553..791af6a5a237e6226b4cea543203bb5efef857a3 100644 (file)
@@ -63,13 +63,7 @@ void FormParagraph::disconnect()
 
 Paragraph const * FormParagraph::getCurrentParagraph() const
 {
-       LyXText * text = 0;
-
-       if (lv_->view()->theLockingInset())
-               text = lv_->view()->theLockingInset()->getLyXText(lv_->view());
-       if (!text)
-               text = lv_->view()->text;
-       return text->cursor.par();
+       return lv_->view()->getLyXText()->cursor.par();
 }
 
 
@@ -278,11 +272,7 @@ void FormParagraph::apply()
     }
 
     Spacing const spacing(linespacing, other_linespacing);
-    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());
     text->setParagraph(lv_->view(), line_top, line_bottom, pagebreak_top,
                       pagebreak_bottom, space_top, space_bottom, spacing,
                        align, labelwidthstring, noindent);