From 239a2e89285cda24406154996268f401e78d55d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Wed, 25 Oct 2000 14:37:39 +0000 Subject: [PATCH] Fixed spurious cursor line bug! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1155 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 4 ++++ src/insets/insettext.C | 1 - src/screen.C | 10 +++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8274e4d29..4510eeb01c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-10-25 Juergen Vigna + + * src/screen.C (ShowManualCursor): fixed another uint -> int problem. + 2000-10-25 Lars Gullik Bjønnes * src/support/filetools.C (MakeRelPath): change some types to diff --git a/src/insets/insettext.C b/src/insets/insettext.C index e4d88f5b06..3938da614a 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -114,7 +114,6 @@ InsetText::~InsetText() { for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit) delete (*cit).second; -// deleteLyXText((*cit).first); LyXParagraph * p = par->next; delete par; while(p) { diff --git a/src/screen.C b/src/screen.C index d232e94c28..8d7b8e9095 100644 --- a/src/screen.C +++ b/src/screen.C @@ -242,10 +242,8 @@ bool LyXScreen::FitManualCursor(LyXText * text, void LyXScreen::ShowManualCursor(LyXText const * text, int x, int y, int asc, int desc, Cursor_Shape shape) { - unsigned int y1 = max(y - text->first - asc, 0); - typedef unsigned int uint; - - unsigned int y2 = min(y - text->first + desc, (int)owner.height()); + int y1 = max(y - text->first - asc, 0); + int y2 = min(y - text->first + desc, (int)owner.height()); // Secure against very strange situations y2 = max(y2, y1); @@ -255,7 +253,7 @@ void LyXScreen::ShowManualCursor(LyXText const * text, int x, int y, cursor_pixmap = 0; } - if (y2 > 0 && y1 < owner.height()) { + if ((y2 > 0) && (y1 < int(owner.height()))) { cursor_pixmap_h = y2 - y1 + 1; cursor_pixmap_y = y1; @@ -458,8 +456,6 @@ void LyXScreen::ToggleToggle(LyXText * text, int y_offset, int x_offset) - text->toggle_end_cursor.row()->baseline() + text->toggle_end_cursor.row()->height(); - typedef unsigned int uint; - bottom = min(max(bottom, text->first), (int)(text->first + owner.height())); top = min(max(top, text->first), (int)(text->first + owner.height()));