mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
dump error on deck load fail, don't update widget on space
This commit is contained in:
parent
1313cca356
commit
4aa958a40f
2 changed files with 2 additions and 7 deletions
|
@ -267,11 +267,7 @@ class FactEditor(object):
|
||||||
"Save field text into fact."
|
"Save field text into fact."
|
||||||
for (w, f) in self.widgets.items():
|
for (w, f) in self.widgets.items():
|
||||||
v = tidyHTML(unicode(w.toHtml()))
|
v = tidyHTML(unicode(w.toHtml()))
|
||||||
if not v.strip():
|
self.fact[f.name] = v.strip()
|
||||||
# strip blank spaces
|
|
||||||
v = u""
|
|
||||||
w.setText(v)
|
|
||||||
self.fact[f.name] = v
|
|
||||||
self.fact.setModified(textChanged=True)
|
self.fact.setModified(textChanged=True)
|
||||||
self.deck.setModified()
|
self.deck.setModified()
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
|
|
||||||
# fixme: sample files read only, need to copy
|
|
||||||
|
|
||||||
import os, sys, re, types, gettext, stat, traceback
|
import os, sys, re, types, gettext, stat, traceback
|
||||||
import copy, shutil, time, glob
|
import copy, shutil, time, glob
|
||||||
|
|
||||||
|
@ -413,6 +411,7 @@ class AnkiQt(QMainWindow):
|
||||||
if interactive:
|
if interactive:
|
||||||
ui.utils.showInfo(_("Deck is already open."))
|
ui.utils.showInfo(_("Deck is already open."))
|
||||||
else:
|
else:
|
||||||
|
traceback.print_exc()
|
||||||
ui.utils.showInfo(_("""\
|
ui.utils.showInfo(_("""\
|
||||||
Unable to load deck.
|
Unable to load deck.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue