Don't fully clean up labels if their frame is gone

Otherwise they're invalid but still in the HintContext, so calling
.hide() on it later (e.g. because the user pressed another key) would
give us a RuntimeError from PyQt.
This commit is contained in:
Florian Bruhin 2016-08-17 15:24:10 +02:00
parent f42f54f403
commit d87a255c0a

View File

@ -121,7 +121,7 @@ class HintLabel(QLabel):
log.hints.debug("Contents size changed...!")
if self.elem.frame() is None:
# This sometimes happens for some reason...
self.cleanup()
self.hide()
else:
self._move_to_elem()