text: Fix regression

When the ClutterTextBuffer support inside ClutterText was merged, it
introduced a regression that was identified and fixed in bug 659116.

The optimization to not paint empty ClutterText actors is only valid
is the actor is not editable, or if the cursor is not visible.
This commit is contained in:
Emmanuele Bassi 2012-02-11 16:02:31 +00:00
parent f770cce7a5
commit cd118f0dc0

View File

@ -2011,14 +2011,11 @@ clutter_text_paint (ClutterActor *self)
tied to the workings of this function */
n_chars = clutter_text_buffer_get_length (get_buffer (text));
if (G_UNLIKELY (priv->font_desc == NULL || n_chars == 0))
{
CLUTTER_NOTE (ACTOR, "desc: %p",
priv->font_desc ? priv->font_desc : 0x0);
return;
}
/* don't bother painting an empty text actor */
/* don't bother painting an empty text actor, unless it's
* editable, in which case we want to paint at least the
* cursor
*/
if (n_chars == 0 && (!priv->editable || !priv->cursor_visible))
return;