_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.
This commit is contained in:
@@ -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<BTextControl*>(Parent())) {
|
||||
BRect frame = Frame();
|
||||
frame.InsetBy(-1.0, -1.0);
|
||||
parent->Invalidate(frame);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user