]> git.lyx.org Git - features.git/commitdiff
Fixed redraw problem when resizing vertically and cursor inside a inset.
authorJürgen Vigna <jug@sad.it>
Fri, 25 Aug 2000 11:50:32 +0000 (11:50 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 25 Aug 2000 11:50:32 +0000 (11:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@987 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/WorkArea.h
src/frontends/kde/lyxgui.kdevprj
src/lyxscreen.h
src/screen.C
src/text.C

index 54b1b4eaf31e9914cdfaca76123029c9aebad862..1e10446b35b8dbc8c62273dfde17434384af799a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-08-25  Juergen Vigna  <jug@sad.it>
+
+       * src/lyxscreen.h: add force_clear variable and fuction to force
+       a clear area when redrawing in LyXText.
+
+       * src/text.C (GetVisibleRow): look if the screen forces a redraw.
+
 2000-08-25  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * some whitespace and comment changes.
index df91b43618dbd5d77ebb8f0974cca1725ca066d4..18b10611c796ce68e1040099a1ff1c84da88df22 100644 (file)
@@ -146,5 +146,7 @@ private:
        Painter painter_;
        ///
        FL_OBJECT * figinset_canvas;
+       /// if we call redraw with true needed for locking-insets
+       bool screen_cleared;
 };
 #endif
index cfd14cfd3421423bf1b9f5ee82e3d446d14df630..147a51367aacb4074b1661a25d5e097562094a23 100644 (file)
@@ -5,7 +5,7 @@ show_outputview=true
 show_treeview=true
 header_file=Untitled.h
 cpp_file=Untitled.cpp
-browser_file=file:/usr/doc/qt1x-devel-1.45/qimageio.html
+browser_file=file:/usr/doc/qt1x-devel-1.45/qlistbox.html
 [formcopyright.C]
 install_location=
 dist=true
index 89e8cb01f143cdcdbad755a38502285a5888eebb..5a4dc7f2ba732595852212509b5b4484c29069aa 100644 (file)
@@ -84,6 +84,8 @@ public:
            If text->status is LyXText::NEED_VERY_LITTLE_REFRESH,
            we only update the current row. */
        void Update(LyXText *, int y_offset=0, int x_offset=0);
+       ///
+       bool forceClear() const { return force_clear; }
 
        ///
        bool cursor_visible;
@@ -113,6 +115,8 @@ private:
        int cursor_pixmap_h;
        ///
        GC gc_copy;
+       ///
+       bool force_clear;
 };
 
 #endif
index beaf52d6694bf3abbee663586fef914a89045bf9..38effb1e19b64b285c19f72be1e8c128f4772644 100644 (file)
@@ -47,7 +47,7 @@ GC createGC()
 
 // Constructor
 LyXScreen::LyXScreen(WorkArea & o) //, LyXText * text_ptr)
-       : owner(o) //, text(text_ptr)
+       : owner(o), force_clear(true) //, text(text_ptr)
 {
        // the cursor isnt yet visible
        cursor_visible = false;
@@ -108,7 +108,8 @@ void LyXScreen::DrawFromTo(LyXText * text, int y1, int y2, int y_offset, int x_o
                y += row->height();
                row = row->next();
        }
-   
+       force_clear = false;
+
        // maybe we have to clear the screen at the bottom
        if ((y < y2) && text->bv_owner) {
                owner.getPainter().fillRectangle(0, y,
@@ -135,6 +136,7 @@ void LyXScreen::DrawOneRow(LyXText * text, Row * row, long y_text,
                } while (text->status == LyXText::CHANGED_IN_DRAW);
                text->status = st;
        }
+       force_clear = false;
 }
 
 
index 0783fe9753bee37361c04ea47de743a87df94196..175ef9e90038d02efc4bbb315269b50c8a427ac6 100644 (file)
@@ -36,6 +36,7 @@
 #include "tracer.h"
 #include "font.h"
 #include "encoding.h"
+#include "lyxscreen.h"
 
 using std::max;
 using std::min;
@@ -3928,12 +3929,13 @@ void LyXText::GetVisibleRow(BufferView * bview, int y_offset, int x_offset,
        bool clear_area = true;
        Inset * inset = 0;
 
-       if ((last == row_ptr->pos()) &&
+       if (!bview->screen()->forceClear() && (last == row_ptr->pos()) &&
            (row_ptr->par()->GetChar(row_ptr->pos()) == LyXParagraph::META_INSET) &&
            (inset = row_ptr->par()->GetInset(row_ptr->pos()))) {
                clear_area = inset->doClearArea();
        }
-       if (cleared) { // we don't need to clear it's already done!!!
+       // we don't need to clear it's already done!!!
+       if (cleared) {
                clear_area = true;
        } else if (clear_area) {
                int w = (inset_owner ? inset_owner->width(bview, font) : ww);