Return on invalid rects
This commit is contained in:
parent
5dd74d39fd
commit
293b38a92f
@ -72,15 +72,10 @@ class HintManager:
|
|||||||
def _draw_label(self, elem):
|
def _draw_label(self, elem):
|
||||||
"""Draw a hint label over an element."""
|
"""Draw a hint label over an element."""
|
||||||
rect = elem.geometry()
|
rect = elem.geometry()
|
||||||
if rect.x() == 0 and rect.y() == 0:
|
if not rect.isValid():
|
||||||
logging.warn("Element is at 0/0...")
|
|
||||||
return
|
return
|
||||||
logging.debug("rect: {}/{}".format(rect.x(), rect.y()))
|
css = HintManager.HINT_CSS.format(left=rect.x(), top=rect.y(),
|
||||||
css = HintManager.HINT_CSS.format(
|
|
||||||
left=rect.x(),
|
|
||||||
top=rect.y(),
|
|
||||||
config=config.instance)
|
config=config.instance)
|
||||||
logging.debug("css: {}".format(css))
|
|
||||||
doc = self._frame.documentElement()
|
doc = self._frame.documentElement()
|
||||||
doc.appendInside('<span class="qutehint" style="{}">foo</span>'.format(
|
doc.appendInside('<span class="qutehint" style="{}">foo</span>'.format(
|
||||||
css))
|
css))
|
||||||
|
Loading…
Reference in New Issue
Block a user