From 4aa958a40febcc770bd621f410cb19079e853d4f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 21 Nov 2008 15:48:59 +0900 Subject: [PATCH] dump error on deck load fail, don't update widget on space --- ankiqt/ui/facteditor.py | 6 +----- ankiqt/ui/main.py | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index c46c350e0..59ad7538d 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -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() diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index ee13634d0..e6797bf5e 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -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.