From d692aea5c6732eb52dce88e214fcd0839337b653 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 15 Apr 2009 19:03:09 +0000 Subject: [PATCH] RichTextView::NoLazy avoids lazy update of images git-svn-id: svn://ultimatepp.org/upp/trunk@1061 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/RichText.h | 3 +++ uppsrc/CtrlLib/RichTextView.cpp | 4 +++- uppsrc/ide/About.cpp | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/uppsrc/CtrlLib/RichText.h b/uppsrc/CtrlLib/RichText.h index 730190f5f..0768b060d 100644 --- a/uppsrc/CtrlLib/RichText.h +++ b/uppsrc/CtrlLib/RichText.h @@ -26,6 +26,7 @@ private: int highlight; int sell, selh; int cursor, anchor; + bool lazy; void EndSizeTracking(); void SetSb(); @@ -88,6 +89,8 @@ public: RichTextView& AutoHideSb(bool b = true) { sb.AutoHide(b); return *this; } RichTextView& HyperlinkDecoration(bool b = true) { hldec = b; Refresh(); return *this; } RichTextView& NoHyperlinkDecoration() { return HyperlinkDecoration(false); } + RichTextView& Lazy(bool b) { lazy = b; return *this; } + RichTextView& NoLazy() { return Lazy(false); } void operator=(const char *qtf) { SetQTF(qtf); } diff --git a/uppsrc/CtrlLib/RichTextView.cpp b/uppsrc/CtrlLib/RichTextView.cpp index b1af2d08f..697c946de 100644 --- a/uppsrc/CtrlLib/RichTextView.cpp +++ b/uppsrc/CtrlLib/RichTextView.cpp @@ -242,7 +242,8 @@ void RichTextView::EndSizeTracking() void RichTextView::Layout() { - if(IsOpen()) { + sizetracking = false; + if(IsOpen() && lazy) { sizetracking = true; KillTimeCallback(TIMEID_ENDSIZETRACKING); SetTimeCallback(250, THISBACK(EndSizeTracking), TIMEID_ENDSIZETRACKING); @@ -392,6 +393,7 @@ RichTextView::RichTextView() SetFrame(ViewFrame()); AddFrame(sb); NoWantFocus(); + lazy = true; } RichTextView::~RichTextView() {} diff --git a/uppsrc/ide/About.cpp b/uppsrc/ide/About.cpp index ad5be7096..297100a48 100644 --- a/uppsrc/ide/About.cpp +++ b/uppsrc/ide/About.cpp @@ -37,6 +37,7 @@ Size MakeLogo(Ctrl& parent, Array& ctrl) w.PageWidth(2900); w.NoSb(); w.SetFrame(NullFrame()); + w.NoLazy(); parent.Add(w.TopPos(isz.cy + 3, 99).LeftPos(0, isz.cx)); return sz; } @@ -87,6 +88,7 @@ struct AboutDlg : TopWindow { about.RightPos(0, 1000 - isz.cx).VSizePos(); about.HMargins(4); about.SetFrame(NullFrame()); + about.NoLazy(); Background(PaintRect(ColorDisplay(), SColorPaper())); Add(about); Title("About TheIDE");