From ca04b6296707a1a9f8a89268a3b833d9eaf733e5 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Fri, 19 Oct 2012 21:13:20 +0000 Subject: Improve selection of default font This commit fix the selection of all the text in the case of a already existing istance introduced by b98d3da3 Signed-off-by: Gonzalo Odiard --- diff --git a/AbiWordActivity.py b/AbiWordActivity.py index 2dff90b..27b90f7 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -208,12 +208,12 @@ class AbiWordActivity(activity.Activity): 'com.abisource.abiword.loadbindings.fromURI', keybindings_file, 0, 0) # set default font - self.abiword_canvas.select_all() - # get_selection return content and length if self._new_instance: + self.abiword_canvas.select_all() logging.error('Setting default font to Sans in new documents') self.abiword_canvas.set_font_name('Sans') - self.abiword_canvas.moveto_bod() + self.abiword_canvas.moveto_bod() + self.abiword_canvas.select_bod() def get_preview(self): if not hasattr(self.abiword_canvas, 'render_page_to_image'): -- cgit v0.9.1