]> git.lyx.org Git - features.git/commitdiff
Fixed spurious cursor line bug!
authorJürgen Vigna <jug@sad.it>
Wed, 25 Oct 2000 14:37:39 +0000 (14:37 +0000)
committerJürgen Vigna <jug@sad.it>
Wed, 25 Oct 2000 14:37:39 +0000 (14:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1155 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/insets/insettext.C
src/screen.C

index c8274e4d294695c6275a0a8a42af5c6e5b73a563..4510eeb01cd8231cef617b0e85747c8a1ac260e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-10-25  Juergen Vigna  <jug@sad.it>
+
+       * src/screen.C (ShowManualCursor): fixed another uint -> int problem.
+
 2000-10-25  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/support/filetools.C (MakeRelPath): change some types to
index e4d88f5b062ad9ce9b5ddc4a5ba12b3775b6a07b..3938da614a4f5d9f3dd0e6b7f23851362d05f478 100644 (file)
@@ -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) {
index d232e94c284a64b9d3f77e1cc6a82573a2664934..8d7b8e90958704d31bde699470813d117b7633d0 100644 (file)
@@ -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()));