]> git.lyx.org Git - features.git/commitdiff
small cleanup in status()
authorJohn Levon <levon@movementarian.org>
Fri, 2 Aug 2002 00:57:56 +0000 (00:57 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 2 Aug 2002 00:57:56 +0000 (00:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4833 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text2.C

index 256da055611a2244b43fb448b370ae90649794e2..3ea146d3e7cfc08d284f015bab967c15bf166549 100644 (file)
@@ -1,3 +1,7 @@
+2002-08-02  John Levon  <levon@movementarian.org>
+
+       * text2.C (status): small cleanup, no logic change
 2002-08-01  John Levon  <levon@movementarian.org>
 
        * buffer.h: 
index 506d9579125e38fa3fe64d2aca5a2b1949f598d0..bdcc1c0d6dfd56d07d3d8b7f02c129b5ed2ae7bb 100644 (file)
@@ -2633,6 +2633,8 @@ LyXText::text_status LyXText::status() const
 
 void LyXText::status(BufferView * bview, LyXText::text_status st) const
 {
+       LyXText * t = view->text;
        // We should only go up with refreshing code so this means that if
        // we have a MORE refresh we should never set it to LITTLE if we still
        // didn't handle it (and then it will be UNCHANGED. Now as long as
@@ -2643,17 +2645,14 @@ void LyXText::status(BufferView * bview, LyXText::text_status st) const
        // tell'em that it should redraw the actual row (where the inset
        // resides! Capito?!
 
-       if ((status_ != NEED_MORE_REFRESH)
-           || (status_ == NEED_MORE_REFRESH
-               && st != NEED_VERY_LITTLE_REFRESH))
-       {
+       if (status_ != NEED_MORE_REFRESH || st != NEED_VERY_LITTLE_REFRESH) {
                status_ = st;
                if (inset_owner && st != UNCHANGED) {
-                       bview->text->status(bview, NEED_VERY_LITTLE_REFRESH);
-                       if (!bview->text->refresh_row) {
-                               bview->text->refresh_row = bview->text->cursor.row();
-                               bview->text->refresh_y = bview->text->cursor.y() -
-                                       bview->text->cursor.row()->baseline();
+                       t->status(bview, NEED_VERY_LITTLE_REFRESH);
+                       if (!t->refresh_row) {
+                               t->refresh_row = t->cursor.row();
+                               t->refresh_y = t->cursor.y() -
+                                       t->cursor.row()->baseline();
                        }
                }
        }