_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;
|
fPreviousText = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (Window()) {
|
if (Window() != NULL) {
|
||||||
// TODO: why do we have to invalidate here?
|
// Invalidate parent to draw or remove the focus mark
|
||||||
// I'm leaving this in, but it looks suspicious... :-)
|
|
||||||
// Invalidate(Bounds());
|
|
||||||
if (BTextControl* parent = dynamic_cast<BTextControl*>(Parent())) {
|
if (BTextControl* parent = dynamic_cast<BTextControl*>(Parent())) {
|
||||||
BRect frame = Frame();
|
BRect frame = Frame();
|
||||||
frame.InsetBy(-1.0, -1.0);
|
frame.InsetBy(-1.0, -1.0);
|
||||||
parent->Invalidate(frame);
|
parent->Invalidate(frame);
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user