From 06cdb6558fe3a25e4e4034839f1b845f9bb41e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 16 Mar 2015 23:21:52 +0000 Subject: [PATCH] _BTextInput_: Only invalidate parent when in a window. * Otherwise there is nothing to it. * Removed comment and commented out invalidation. Seems to work just fine without it, and I cannot think of a reason why it should be there. --- src/kits/interface/TextInput.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/TextInput.cpp b/src/kits/interface/TextInput.cpp index 329c8bfc49..d334cc6364 100644 --- a/src/kits/interface/TextInput.cpp +++ b/src/kits/interface/TextInput.cpp @@ -140,16 +140,14 @@ _BTextInput_::MakeFocus(bool state) fPreviousText = NULL; } -// if (Window()) { -// TODO: why do we have to invalidate here? -// I'm leaving this in, but it looks suspicious... :-) -// Invalidate(Bounds()); + if (Window() != NULL) { + // Invalidate parent to draw or remove the focus mark if (BTextControl* parent = dynamic_cast(Parent())) { BRect frame = Frame(); frame.InsetBy(-1.0, -1.0); parent->Invalidate(frame); } -// } + } }