dump error on deck load fail, don't update widget on space

This commit is contained in:
Damien Elmes 2008-11-21 15:48:59 +09:00
parent 1313cca356
commit 4aa958a40f
2 changed files with 2 additions and 7 deletions

View file

@ -267,11 +267,7 @@ class FactEditor(object):
"Save field text into fact."
for (w, f) in self.widgets.items():
v = tidyHTML(unicode(w.toHtml()))
if not v.strip():
# strip blank spaces
v = u""
w.setText(v)
self.fact[f.name] = v
self.fact[f.name] = v.strip()
self.fact.setModified(textChanged=True)
self.deck.setModified()

View file

@ -5,8 +5,6 @@
from PyQt4.QtGui import *
from PyQt4.QtCore import *
# fixme: sample files read only, need to copy
import os, sys, re, types, gettext, stat, traceback
import copy, shutil, time, glob
@ -413,6 +411,7 @@ class AnkiQt(QMainWindow):
if interactive:
ui.utils.showInfo(_("Deck is already open."))
else:
traceback.print_exc()
ui.utils.showInfo(_("""\
Unable to load deck.