From 8ef935804e6fd24e50dea9b78d6d91983b6fb023 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 28 Mar 2013 16:23:33 +0000 Subject: [PATCH] 6340: In Family Tree Manager window, naming a tree which takes it out of view does not scroll to new name svn: r21791 --- gramps/gui/dbman.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index 2b873fef2..f73d47503 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -415,7 +415,7 @@ class DbManager(CLIDbManager): def __start_edit(self, *args): """ - Do no allow to click Load while changing name, to force users to finish + Do not allow to click Load while changing name, to force users to finish the action of renaming. Hack around the fact that clicking button sends a 'editing-canceled' signal loosing the new name """ @@ -473,6 +473,10 @@ class DbManager(CLIDbManager): ) else: self.model.set_value(node, NAME_COL, new_text) + #scroll to new position + store, node = self.selection.get_selected() + tree_path = store.get_path(node) + self.dblist.scroll_to_cell(tree_path, None, False, 0.5, 0.5) def __rename_database(self, path, new_text): """ @@ -489,6 +493,10 @@ class DbManager(CLIDbManager): if not (old_text is None): rename_filename(old_text, new_text) self.model.set_value(node, NAME_COL, new_text) + #scroll to new position + store, node = self.selection.get_selected() + tree_path = store.get_path(node) + self.dblist.scroll_to_cell(tree_path, None, False, 0.5, 0.5) def __rcs(self, obj): """