mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
if importing is just a 'x notes imported' message, use a tooltip
This commit is contained in:
parent
3acea038a2
commit
43b348511c
1 changed files with 6 additions and 2 deletions
|
@ -6,7 +6,7 @@ from aqt.qt import *
|
|||
import anki
|
||||
import anki.importing as importing
|
||||
from aqt.utils import getOnlyText, getFile, showText, showWarning, openHelp, \
|
||||
askUserDialog, askUser
|
||||
askUserDialog, askUser, tooltip
|
||||
from anki.errors import *
|
||||
from anki.hooks import addHook, remHook
|
||||
import aqt.forms, aqt.modelchooser, aqt.deckchooser
|
||||
|
@ -309,7 +309,11 @@ Unable to import from a read-only file."""))
|
|||
msg += unicode(traceback.format_exc(), "ascii", "replace")
|
||||
showText(msg)
|
||||
else:
|
||||
showText("\n".join(importer.log))
|
||||
log = "\n".join(importer.log)
|
||||
if "\n" not in log:
|
||||
tooltip(log)
|
||||
else:
|
||||
showText(log)
|
||||
finally:
|
||||
mw.progress.finish()
|
||||
mw.reset()
|
||||
|
|
Loading…
Reference in a new issue