From f11ab7d0c3ab1b32076f66ed36997cf3321a1309 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 16 Oct 2013 11:19:38 +0530 Subject: [PATCH] Use same code for initializing CC comments editor as for builtin comments editor --- src/calibre/gui2/custom_column_widgets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py index 4223a638f2..5cbd318ee9 100644 --- a/src/calibre/gui2/custom_column_widgets.py +++ b/src/calibre/gui2/custom_column_widgets.py @@ -234,9 +234,12 @@ class Comments(Base): self.widgets = [self._box] def setter(self, val): - if val is None: + if not val or not val.strip(): val = '' - self._tb.html = comments_to_html(val) + else: + val = comments_to_html(val) + self._tb.html = val + self._tb.wyswyg_dirtied() def getter(self): val = unicode(self._tb.html).strip()