From 25ad8b2c74d96126d808089c045e3304aa0bbea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 3 May 2005 21:51:29 +0000 Subject: [PATCH] replaced direct calling of Draw() with Invalidate() where appropriate git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12563 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/CheckBox.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/kits/interface/CheckBox.cpp b/src/kits/interface/CheckBox.cpp index 57d77e52ef..d070964cd7 100644 --- a/src/kits/interface/CheckBox.cpp +++ b/src/kits/interface/CheckBox.cpp @@ -234,16 +234,18 @@ BCheckBox::MouseDown(BPoint point) return; fOutlined = true; - Draw(Bounds()); - Flush(); if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) { + Invalidate(); SetTracking(true); SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS); } else { BRect bounds = Bounds(); uint32 buttons; + Draw(Bounds()); + Flush(); + do { snooze(40000); @@ -301,8 +303,7 @@ BCheckBox::MouseUp(BPoint point) if (fOutlined != inside) { fOutlined = inside; - Draw(Bounds()); - Flush(); + Invalidate(); } if (fOutlined) { @@ -310,8 +311,7 @@ BCheckBox::MouseUp(BPoint point) SetValue(!Value()); Invoke(); } else { - Draw(Bounds()); - Flush(); + Invalidate(); } SetTracking(false); @@ -329,8 +329,7 @@ BCheckBox::MouseMoved(BPoint point, uint32 transit, if (fOutlined != inside) { fOutlined = inside; - Draw(Bounds()); - Flush(); + Invalidate(); } }