From: Ed Page Date: Sat, 5 Jun 2010 16:31:46 +0000 (-0500) Subject: Scroll to selected item X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=commitdiff_plain;h=b03d52843b322cdbb787d4a9bb769da50220c491 Scroll to selected item --- diff --git a/src/gonvert_qt.py b/src/gonvert_qt.py index c4a8377..b67b7ed 100755 --- a/src/gonvert_qt.py +++ b/src/gonvert_qt.py @@ -651,7 +651,11 @@ class CategoryWindow(object): child.close() self._unitWindow = UnitWindow(self._window, categoryName, self._app) self._unitWindow.window.destroyed.connect(self._on_child_close) - # @todo Add scroll to category + + i = unit_data.UNIT_CATEGORIES.index(categoryName) + rootIndex = self._categories.rootIndex() + currentIndex = self._categories.model().index(i, 0, rootIndex) + self._categories.scrollTo(currentIndex) return self._unitWindow def set_fullscreen(self, isFullscreen):