From 61128e3020b1df8b6008cf9bdf6a5161f3104082 Mon Sep 17 00:00:00 2001
From: Roger Siddons <dizygotheca@ntlworld.com>
Date: Thu, 27 Aug 2015 18:58:27 +0100
Subject: [PATCH 10/15] MythUI: Don't draw empty text
Text that doesn't fit into a UI item for some reason results in errors:
QPainter::begin: Paint device returned engine == 0, type: 3
2015-10-10 16:50:23.512923 E MythPainter::GetImageFromTextLayout: Invalid canvas.
2015-10-10 16:50:23.512939 D MythPainter::DrawTextLayout: Rendered image is null.
The QRect created by the formatting is empty but not null and we shouldn't try to render it.
diff --git a/mythtv/libs/libmythui/mythuitext.cpp b/mythtv/libs/libmythui/mythuitext.cpp
index 9a498cc..52405a5 100644
a
|
b
|
void MythUIText::ShiftCanvas(int x, int y) |
406 | 406 | void MythUIText::DrawSelf(MythPainter *p, int xoffset, int yoffset, |
407 | 407 | int alphaMod, QRect clipRect) |
408 | 408 | { |
409 | | if (m_Canvas.isNull()) |
| 409 | if (m_Canvas.isEmpty()) |
410 | 410 | return; |
411 | 411 | |
412 | 412 | FormatVector formats; |