warn and close when media server requests fail

This commit is contained in:
Damien Elmes 2018-06-29 17:17:13 +10:00
parent 01832e1312
commit 9987c18a1c

View file

@ -314,5 +314,11 @@ body {{ zoom: {}; {} }}
self.evalWithCallback("$(document.body).height()", self._onHeight)
def _onHeight(self, qvar):
if qvar is None:
from aqt import mw
openLink("https://anki.tenderapp.com/kb/problems/anki-must-be-able-to-connect-to-a-local-port")
mw.app.closeAllWindows()
return
height = math.ceil(qvar*self.zoomFactor())
self.setFixedHeight(height)