From: John Levon Date: Fri, 2 Aug 2002 00:57:56 +0000 (+0000) Subject: small cleanup in status() X-Git-Tag: 1.6.10~18708 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f4e60f017e9f7b9cdde6d45ad2a6fbfc4c410a51;p=features.git small cleanup in status() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4833 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 256da05561..3ea146d3e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-08-02 John Levon + + * text2.C (status): small cleanup, no logic change + 2002-08-01 John Levon * buffer.h: diff --git a/src/text2.C b/src/text2.C index 506d957912..bdcc1c0d6d 100644 --- a/src/text2.C +++ b/src/text2.C @@ -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(); } } }