GeoView : Added some corrections for issue 3312

When we switch between databases, if no info exist for the current view,
          don't try to load the page.


svn: r13844
This commit is contained in:
Serge Noiraud 2009-12-18 07:36:20 +00:00
parent f31b20e7a9
commit 74752f1360

View File

@ -439,12 +439,14 @@ class GeoView(HtmlView):
self._savezoomandposition()
# Need to wait the page is loaded to show the markers.
gobject.timeout_add(1500, self._show_selected_places)
#self._erase_placebox_selection()
self._erase_placebox_selection()
def _show_selected_places(self):
"""
Here, we synchronize the years combobox with the renderer
except when we are in the places view.
"""
if self.displaytype != "places":
index = 0
for r_year in self.buttons:
if self.last_selected_year == r_year[0]:
@ -510,9 +512,9 @@ class GeoView(HtmlView):
def _erase_placebox_selection(self):
"""
We erase the place selected after 2 secondes.
We erase the place name in the entrybox after 1 second.
"""
gobject.timeout_add(2000, self.placebox.child.set_text, "")
gobject.timeout_add(1000, self.placebox.child.set_text, "")
def on_delete(self):
"""
@ -1051,8 +1053,8 @@ class GeoView(HtmlView):
if modulo == 0:
modulo = 10
self.minyear -= self.minyear % 10
self.maxyear -= self.maxyear % 10
self.yearint = ( self.maxyear - self.minyear ) / 10 + 5
self.maxyear -= ( self.maxyear % 10 ) + 10
self.yearint = ( self.maxyear - self.minyear ) / ( self.maxbut - 1 )
self.yearint -= ( self.yearint % modulo )
if self.yearint == 0:
self.yearint = 10