]> git.lyx.org Git - features.git/commitdiff
fix to Bug: 1110
authorAlfredo Braunstein <abraunst@lyx.org>
Wed, 21 May 2003 11:39:20 +0000 (11:39 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Wed, 21 May 2003 11:39:20 +0000 (11:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6992 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index 0ef74fc4055d4ffd83f40796b9058d2a7c7080a5..9b9d5d7d446627f1ee6c61e7f57b4ee7cc81b84b 100644 (file)
@@ -1,3 +1,6 @@
+2003-05-21  Alfredo Braunstein  <abraunst@libero.it>
+
+       * text.C (top_y): fix bug 1110
 
 2003-05-08  Alfredo Braunstein  <abraunst@libero.it>
 
index b79fb2347599ced4074095c119a330d0ab16a3c1..436f94354e0a80f40afcec271b323a7b44d27e7f 100644 (file)
@@ -87,16 +87,24 @@ void LyXText::updateRowPositions()
 
 int LyXText::top_y() const
 {
-       if (isInInset() || anchor_row_ == rowlist_.end() )
+       if (anchor_row_ == rowlist_.end() )
                return 0;
+
        return anchor_row_->y() + anchor_row_offset_;
 }
 
 
 void LyXText::top_y(int newy)
 {
-       if (rows().empty() || isInInset())
+       if (rows().empty())
+               return;
+
+       if (isInInset()) {
+               anchor_row_ = rows().begin();
+               anchor_row_offset_ = newy;
                return;
+       }
+
        lyxerr[Debug::GUI] << "setting top y = " << newy << endl;
 
        int y = newy;