mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
warn and close when media server requests fail
This commit is contained in:
parent
01832e1312
commit
9987c18a1c
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue