diff --git a/src/plugins/view/geoview.py b/src/plugins/view/geoview.py index 59090fd3b..7fb924b57 100644 --- a/src/plugins/view/geoview.py +++ b/src/plugins/view/geoview.py @@ -301,6 +301,8 @@ class GeoView(HtmlView): self.dbstate = dbstate self.uistate = uistate self.dbstate.connect('database-changed', self._new_database) + + def build_widget(self): self.no_network = False self.placeslist = [] self.displaytype = "person" @@ -428,6 +430,7 @@ class GeoView(HtmlView): self.crosspath = urlparse.urlunsplit(('file', '', URL_SEP.join(fpath.split(os.sep)), '', '')) + return HtmlView.build_widget(self) def can_configure(self): """ @@ -696,7 +699,7 @@ class GeoView(HtmlView): return if widget.get_active(): self.last_year = widget - self._set_markersonpage(widget) + self._set_markers_and_crosshair_on_page(widget) def _ask_new_page(self, widget, data=None): # pylint: disable-msg=W0613 """ @@ -972,9 +975,9 @@ class GeoView(HtmlView): self._savezoomandposition() if self.displaytype != "places": # Need to wait the page is loaded to set the markers. - gobject.timeout_add(1500, self._set_markersonpage, self.last_year) + gobject.timeout_add(1500, self._set_markers_and_crosshair_on_page, self.last_year) - def _set_markersonpage(self, widget): + def _set_markers_and_crosshair_on_page(self, widget): """ get the year to select then call javascript """ @@ -993,6 +996,9 @@ class GeoView(HtmlView): elif year != "no": self.last_selected_year = year self._call_js_selectmarkers(year) + self.renderer.execute_script("javascript:addcrosshair('%d','%s')" % + (self._config.get("preferences.crosshair"), + self.crosspath)) def _call_js_selectmarkers(self, year): """ @@ -2252,7 +2258,6 @@ class GeoView(HtmlView): self.filter.hide() active = False config.set('interface.filter', active) - self.build_tree() def filter_clicked(self): """